Can java hashmap have duplicate keys?
No Answer is Posted For this Question
Be the First to Post Answer
how to minimize the functionality to will not force garbage collector?
what is the difference between sleep() and Wait()?
What is a finally block?
What is t type java?
Difference between keyword and identifier.
Which is better singleton or static class?
What is the maximum size of array in java?
How do you sing an Applet ?
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?
How does synchronized modifier work?
Why isn’t there operator overloading?
what is object slice?