How would you like to MASTER graphic design by next week?
Click here to find out how
Featured Photoshop templates - professional ready to use designs for your next project
View all templates
Java Methods Tutorials
Thread States and Lifecycle in Java
Want to start the multithreaded programming? Before starting you need to know what is Thread and what is the life cycle of the Thread. Thread having different states and life cycle methods. To know about the thread you can Visit my last post Java Thread Example. Here we will talk about the life-cycle of the Thread. For more visit the link.
Restrict Access to Your Tomcat Web Application
In this article we will address how to protect an application running on a Tomcat server in Jelastic. We recommend two possible solutions on how to restrict access to your app by requesting the user authentication or just denying the access for specified IP addresses. You can choose one of them or use both methods together.
Start vs Run method in Thread - Java
Learn the difference between the Start and Run methods in this Java tutorial.
How to Find Elements in Java Arrays with Example Code
Unlike Collection classes, arrays do not provide any contains() methods you can use to search an object in an array. We will show you how to overcome this problem.
How to Measure Time in a Java Program
There are two methods to measure time in Java: System.nanoTime and System.currentTimeInMillis. Learn how to use them inside.
How to call method using Reflection in Java
Java example of calling any method using Reflection API. java.lang.reflect package has a class called Method which denotes java methods and have overloaded method invoke() which can be used to call actual method.
How to work with blocking method in Java
Blocking methods put Current thread on blocking position until method returns like ServerSocket accept() method which blocks until a client Socket connects to Server. similarly InputStream read() blocks until last character is available in Stream, if not handled carefully blocking method can hung your program. this article gives some tips on how to call blocking method in java.
Difference between Method Overloading and Method Overriding in Java
Difference between method overloading and method overriding is one of popular core java interview question which explores powerful polymorphism concept in java. method overloading and overriding allows to having two methods with same name but different signature in case of overloading and same signature in case of overriding.
STATIC Keyword in Java
A Tutorial on Static Keyword in Java, telling is usage along with what the difference when used with methods and variables.
How to use blocking method in Java
Java API has several blocking methods in IO, Swing and Threading which can hung the program if not used properly. its quick guide on blocking method in java.
Why wait and notify method is in Object Class
Its bee a classic Java interview questions from long time "Why wait and notify methods are in Object Class in Java" here are few reasons which make sense.
What is static in Java with Example
static is an important keyword in Java. Static can be applied to inner classes, variables and methods. static belongs to Class in Java and value of static variable will always be same for all instance of that Class. static methods are also binded at compile time as opposed to non static method which are binded at runtime. This article explains lot of important details about static keyword in Java.
How to convert decimal to binary in Java with Example
This article is about how to convert decimal string to binary format in Java. many times we need to change the base of numbers and Java provides convenient method and utility to convert form decimal to binary.Java has methods which takes an appropriate value and a based and than convert that into corresponding base.
How to choose between ArrayList and Vector in java
This java tutorial highlight difference between Vector and ArrayList and enable us to take inform decision on where to use vector and where to use arraylist.First and foremost difference is Vector is synchronized and ArrayList is not, what it means is that all the method which structurally modifies Vector e.g. add () or remove () are synchronized which makes it thread-safe and allows it to be used safely in a multi-threaded environment. On the other hand ArrayList methods are not synchronized thus not suitable for use in multi-threaded environment.
3 ways to solve ClassNotFoundException in Java
As the name suggests java.lang.classNotFoundException in Java is a subclass of Exception and Comes when Java Virtual Machine tries to load a particular class and doesn't found the requested class in classpath. ClassNotFoundException is a checked Exception and you need to provide explicitly Exception handling while using methods which can throw java.lang.classNotFoundException in Java either by using try-catch block or by using throws clause. Though underlying concept of classnotfound exception is simple it always manifest itself in such format that you need to spend some time to figure out what exactly wrong with your java classpath. If you want to know secrets of java classpath see the link.