Core Java Interview Questions
How does garbage collector decide which objects are to be removed? Can garbage collector be forced?
Explain the purpose of 'JDK','JRE',LIB' directories.
Give an example of using clone to create an object.
Latest Answer: We can create an object by using clone() method which is a object class method.Create an object like MyClass obj=new MyClass();CloneClass cloneobj=(CloneClass)obj.clone();By this way you can create a copy of an object using obj.clone() method.But you ...
Explain what is superclass reference to subclass object? Why do we go for downcasting?
Latest Answer: superclass classname=new subclass() ...
If Overloading is not going to help to increase performance then why we need to use same name for different methods?
Why spring is considered as light weight & why EJB is heavy weight?
Explain how a WeakHashMap works?
Latest Answer: You put an entry in a WeakHashMap with the object as the key, and the extra information as the map value. Then, as long as you keep a strong reference to the object, you will be able to check the map to retrieve the extra information. And once you ...
What are the code standard used in J2EE project in real time?
Latest Answer: Give proper name for the variable, it has to describe it functions or process. Follow coding standards ...
Explain readLine function in Core Java.
Latest Answer: Actually the readLine() method will reads the data through the bufferdReader object. It reads only one line of data through keyboard. We can't enter the multiple lines of data at runtime.This is the main functionality of the readLine() method. ...
If more than one class is present in one Java file then what will be the java file name?
Latest Answer: If there are more than one class in a java file there is no need of main() in those classeswe can save the file with one of the names of classes.we can compile them but we cant run them.if we want to run them we need a main() with public access specifier ...
Go Top
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home