What does %4d mean in java?
What is the default size of load factor in hashing based collection?
Can we create constructor in abstract class ?
Adapter classes?
How does thread synchronization occurs inside a monitor?
Can we call a non-static method from inside a static method?
What are the basic interfaces of java collections framework?
public class Garbage { int a=0; public void add() { int c=10+20; System.out.println(c); System.out.println(a); } public static void main(String args[]) { Garbage obj=new Garbage(); System.gc(); System.out.println("Garbage Collected"); obj.add(); } } Above is a code in java used for garbage collection. object obj has been created for the class Garbage and system.gc method is called. Then using that object add method is called.System.gc method if called the obj should be garbage collected?
What is package private scope in java?
What is the use of protected in java?
What is the use of a copy constructor?
how you will prevent method overriding?
What is void in java?