Abstract Class and interface
Abstract Class | Interface |
---|
A Java abstract class can have instance methods that implement a default behavior. | Java interface are implicitly abstract and cannot have implementations |
An abstract class may contain non-final variables. | Variables declared in a Java interface is by default final |
A Java abstract class can have the usual flavors of class members like private, protected, etc.. | Members of a Java interface are public by default |
A Java abstract class should be extended using keyword “extends”. | Java interface should be implemented using keyword “implements”. |
A Java class can extend only one abstract class. | A Java class can implement multiple interfaces |
Download the Android app to get all Government Job Notifications on your Mobile.
Download Now
Important: Please always Check and Confirm the above details with the official Advertisement / Notification.