OOPS and Core Java Interview Question and Answers

21. What is Exception Handling in Java?
 
  • A Java exception is an object that describes an exceptional (i.e. error) condition that has occurred in a piece of code.
  • When an exceptional condition arises, an object representing that exception is created and thrown in the method that caused the error.
  • That method may choose to handle the exception, or pass it on.
  • Either way, at some point, the exception is caught and processed. This is called Exception Handling.
 
Your Name Your Email-ID
Your Answer
22. What do you know about Dynamic Initialization?
  Java allows variables to be initialized dynamically, using any expression valid at the time the variable is declared.
 
Your Name Your Email-ID
Your Answer
23. What is Auto boxing and unboxing?
 
  • Auto boxing is the process in which primitive type is automatically boxed in to equivalent type wrapper.
  • There is no need to explicitly do casting for the same.
  • Auto boxing is versa of the same. Valued of the boxed object is converted in to primitive data type.
 
Your Name Your Email-ID
Your Answer
24. What is Serializable?
  The serializable is an interface, which defines no members. Only an object that implements the serializable interface can be saved and restored by the serialization facilities.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 6 of 10