sleep vs wait
sleep wait what is it? Causes the currently executing thread to sleep (temporarily cease execution) for the specified time Causes[…]
Read moreAmplify your java knowledge with javagyansite
sleep wait what is it? Causes the currently executing thread to sleep (temporarily cease execution) for the specified time Causes[…]
Read moreLet us first look into some of the important static methods in Thread Class 1. public static native void sleep(long[…]
Read moreObject class contains the following three methods for inter-thread communication: wait notify notifyAll wait() throws InterruptedException:It causes the current thread to[…]
Read moreWhat are Threads in Java ? Threads in Java are lightweight units of execution within a program that can run[…]
Read moreThere are two ways to run tasks in separate threads. One is by extending Thread class and another one is by implementing Runnable interface. What is[…]
Read moreRunnable Callable- Introduced in Java 1.5 Definition public interface Runnable { public abstract void run(); }To use Runnable, we need to override[…]
Read moreIn java, we have three types of initializers: 1. Static Initializer:can be used to set the value of any static[…]
Read moreequals method is used to check the equality of two objects based on it’s contents. equals versus == If two[…]
Read moreLinkedHashMap implements Map and extends HashMap.Please visit HashMap for understanding the internal working of HashMap before you read further so that it becomes[…]
Read moreClassNotFoundException NoClassDefFoundError Exception or Error? It is of type java.lang.Exception.It is a Checked Exception. It is of type java.lang.Error. When[…]
Read more