What are the difference between class and interfaces:

What are the difference between class and interfaces: Class Interface The methods of a class can be constants or v...

What are the difference between class and interfaces:

Class
Interface
The methods of a class can be constants or variables
The members of an interface are always declared as constant, ie their values are final
The class definition can contain the code for each of its methods. That is, the methods can abstract or non–abstract
The methods in an interface are abstract in nature i.e there is no code associated with them. It is later defined by the class that implements the interface
It can be instantiated by declaring objects
It cannot be used to declare objects. it can only be inherited by a class
It can use various access specifies like public, parametric or protected
It can only use the public access specifies

Related

Java 710300707841602611

Post a Comment

emo-but-icon

item