Search Interview Questions
| 3358 questions in repository.|
There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|Ans. new operator is used to statically create an instance of object. newInstance() is used to create an object dynamically ( like if the class name needs to be picked from configuration file ). If you know what class needs to be initialized , new is the optimized way of instantiating Class.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  java   oops   object instantiation   object creation   class.forname   newinstance   new operator   difference between   advanced intermediate|
|Difference between == and .equals() ?|
| Explain the scenerios to choose between String , StringBuilder and StringBuffer ?|
What is the difference between String , StringBuilder and StringBuffer ?
|What are the difference between composition and inheritance in Java?|
|What is the difference between Encapsulation and Abstraction?|
|What is the difference between final, finally and finalize() ?|
|What is the difference between declaration, instantiation and initialization ?|
|If you are given a choice to use either ArrayList and LinkedList, Which one would you use and Why ?|
|What is the difference between ArrayList and LinkedList ?|
|Difference between first level and second level cache in hibernate ?|
|Difference between TreeMap and HashMap ?|