XtraStudy Header LOGO Home
Java Interview Questions
Question 186
Q.186 Why do we need wrapper classes ?

We can pass them around as method parameters where a method expects an object. It also provides utility methods.
⚔ DISCUSS

Question 187
Q.187 What is the difference between error and an exception ?

An error is an irrecoverable condition occurring at runtime. Such as OutOfMemory error. Exceptions are conditions that occur because of bad input etc. e.g. FileNotFoundException will be thrown if the specified file does not exist.
⚔ DISCUSS

Question 188
Q.188 When a thread is created and started, what is its initial state ?

A thread is in the ready state as initial state after it has been created and started.
⚔ DISCUSS

Categories

Comments (0)


 XtraStudy ADVT Skill India