Posts tagged Self Study

Error & Exception

Error is thrown by JVM in a scenario which is fatal and there is no way for the application program to recover from that error. Unchecked type: ...

Wait() vs. Sleep()

Wait and sleep method are completely different to each other wait() & notify(): method for inter thread communication. sleep(): introducing ...

Synchronized in Thread

While running multi-threads, there will be a significant problem when those threads try to use same resource. For example, multiple people try to ...

System.nanoTime()

It will give you current time in nanoseconds(precise). Usually used for measuring performance of the code. To convert it to in seconds, divide it ...

Runnable vs. Thread

For both, you need to Override run() method to be created as a new thread by start() call. implements Runnable (preferred way) it shares the same ...

Types of variables

Local variables are declared in methods, constructors, or blocks. Local variables are visible only within the declared method, constructor or ...

Enumeration vs. Iterator

Don’t be confused between Enum and Enumeration, totally different. With both, you can enumerate(iterate) the elements in a collection of ...