Tell us something about different types of casting?
No Answer is Posted For this Question
Be the First to Post Answer
What is the purpose of java?
What is the difference between static (class) method and instance method?
What is a file pointer?
Can one thread block the other thread?
Explain some best practices you would apply while using collection in java?
Why do we use return statement?
What are the types of strings?
How Vector class is synchronized,How to build user defined class as synchronized?
What are design patterns and please explain?
Write a java program to get a string of words and print the numbers of each word count in descending order
What is console based application 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?