Posts tagged Self Study

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 ...

Break & Continue

Totally exit from loop(for,while,do~while) or from switch. Example… Output… exit only current turn from loop(for,while,do~while), ...