Is java based on c?
Why scanner is used in java?
Is an integer an object?
What is byte data type?
Explain Linked HashSet
What is multi-catch block 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?
How does multithreading take place on a computer with a single cpu?
Can we have any code between try and finally blocks?
In Java why we write public static void main(String args[]) why not main()?
46 Answers Aptech, GE Healthcare, Infosys, Microsoft, New Horizon, Practical Viva Questions, TCS, Wipro,
Is break statement can be used as labels in java?
Will set allow duplicates in java?
I want to run a simple hello world java (HelloWorld.java) program using a batch file. How can i run it and how to construct a batch file.