What if the main method is declared as private?
The program compiles properly but at runtime it will give “Main method not public.” message.
What is an Iterator interface?
The Iterator interface is used to step through the elements of a Collection .
Describe the Garbage Collection process in Java ?
The JVM spec mandates automatic garbage collection outside of the programmers control. The System.gc() or Runtime.gc() is merely a suggestion to the JVM to run the GC process but is NOT guaranteed.
How many static init can you have ?
As many as you want, but the static initializers and class variable initializers are executed in textual order and may not refer to class variables declared in the class whose declarations appear textually after the use, even though these class variables are in scope.
What is constructor chaining and how is it achieved in Java ?
A child object constructor always first needs to construct its parent (which in turn calls its parent constructor.). In Java it is done via an implicit call to the no-args constructor as the first statement