What is the difference between an Abstract class and Interface?

What is the difference between an Abstract class and Interface?

An abstract class can have both abstract and concrete methods whereas an interface can have only method signatures.

An abstract class is to be extended by another class, where as an interface is to be implemented in another class.

A class can extend only one abstract class, whereas a class can implement multiple interfaces.

By default, all the methods are abstract and public in interface, whereas in abstract class, the key words public and abstract are to be explicitly specified in an abstract class.
What is singleton class? Where is it used?
What is singleton class? - A class is defined as singleton class, if and only if it can create only one object...
What is a native method?
What is a native method? - A native method is a method which is implemented in a non-java language that is targeted for a single machine type...
Difference between a public and a non-public class
Difference between a public and a non-public class - A class with access specifier ‘public’ can be accessed across the packages...
Post your comment