Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 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. throw is used to explicitly throw an exception especially custom exceptions, whereas throws is used to declare that the method can throw an exception.|
We cannot throw multiple exceptions using throw statement but we can declare that a method can throw multiple exceptions using throws and comma separator.
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  java   exceptions   exception handling   throw   throws   difference between   basic interview question basic   frequent|
Try 1 Question(s) Test
|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 ?|