Can a method be overloaded based on different return type but same argument type?
No Answer is Posted For this Question
Be the First to Post Answer
What is a classloader in java?
What are the types of web technologies?
How to display names of all components in a Container?
Define how can we find the actual size of an object on the heap?
How to validate the request (Eg:user name and password) in session(http session)? not in LDAP server ?
What is escape analysis algorithm in JVM and how garbage collection actually worked n how it transfer the objects from one kind of space to other?
Explain notify() method of object class ?
How to display arraylist values 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 do you sort a set in java?
Can we have multiple catch block for a try block?
Is array a class in java?