Which of the classes will have more memory allocated?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

Is hashset ordered java?

0 Answers  


Is it possible to make an array volatile?

1 Answers  


What is return null in java?

0 Answers  


How to synchonise HashMap

4 Answers   IBM,


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?

6 Answers  






What are synchronized methods ?

0 Answers  


What are multiple inheritances?

0 Answers  


In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?

0 Answers   MCN Solutions,


Can we override protected method in java?

0 Answers  


Should a main method be compulsorily declared in all java classes?

0 Answers  


How do you use wildcards?

0 Answers  


What is the purpose of tostring() method in java?

0 Answers  


Categories