Q: What is the difference between an Interface and an Abstract class? A: An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation. An [...]
Tags: Java Interview Questions, Core Java, Java Interview Questions and Answers
1. Differentiate between a Class and an Object? A Class is only the definition or prototype of real life object. Whereas an object is an instance or living representation of real life object. Every object belongs to a class and every class contains one or more related objects. 2. What do you understand by a [...]
Tags: Java, Java Interview Questions, Core Java