What is default switch case? Give example.
No Answer is Posted For this Question
Be the First to Post Answer
Can we overload run() method in java?
Can you override a private or static method in java?
What are the latest versions in JAVA related areas?
Can you explain the usages of class.forname()?
Why are functions called methods in java?
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?
Why hashcode is used in java?
What is method in research paper?
What is maximum size of arraylist in java?
What do you mean by object?
why string constant pool in java
What is a constructor, constructor overloading in java?