What is boolean keyword in java?
No Answer is Posted For this Question
Be the First to Post Answer
How do you implement tree mirroring in java?
When should the method invokelater() be used?
Why hashmap is used in java?
Explain jdk, jre and jvm?
Is simpledateformat safe to use in the multithreaded program?
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 sprintf allocate memory?
Explain what pure virtual function is?
What is variable and rules of variable?
as we know a static method could access static data and static method only. then how could main method call the object of aclass which is not static and other non static data
Is singleton a bad practice?
How thread scheduler schedule the task?