Basic Java Interview Question and Answers

25. What is early binding?
  The assignment of types to variables and expression at compilation time is known as Early Binding, it is also called static binding and static typing.
 
Your Name Your Email-ID
Your Answer
26. What is serializable interface?
 
  • In Java.io package there is an interface called java.io.Serializable, which is a syntactic way of serializing objects.
  • This interface does not define any method. The purpose of serialization is persistence, communication over sockets or RMI.
  • In Object serialization an object can be converted into byte stream and vice versa.
 
Your Name Your Email-ID
Your Answer
27. What is the difference between a static and non static inner class?
 
  • A non static inner class may have object instances that are associated with instances of the class’s outer class.
  • A static inner class does not have any object instances.
 
Your Name Your Email-ID
Your Answer
28. What is the difference between static and non static variables?
 
  • A static variables is associated with the class as a whole rather than with specific instances of a class.
  • Non static variables take on unique values with each object instance.
 
Your Name Your Email-ID
Your Answer