What is an immutable class?
No Answer is Posted For this Question
Be the First to Post Answer
What are abstract methods in java?
What are the differences between throw and throws?
How can we create objects if we make the constructor private ?
can we have function for truncating the sign as like abs in oracle.
what is difference between Exception and Error?
What do you mean by scope of variable?
How are this() and super() used with constructors in java programming?
Which collection is sorted 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?
Does .length start 0 java?
When we can access the static data member without creating the object what is the need of the object in java.
5 Answers Airhub, ssinformatics,
Under what conditions is an object’s finalize() method invoked by the garbage collector?