hi friends,
can any one give precise difference between an interface and class in java.
Duplicate:
hi friends,
can any one give precise difference between an interface and class in java.
Duplicate:
Interfaces cannot contain implementation.
An interface is there to define a contract. Implementing an interface is declaring conformance to that contract.
Java does not support multiple inheritance but it does support implementing multiple interfaces.
These question has quite a few good answers.
Why are interfaces preferred to abstract classes
Why would I want to use interfaces
Difference between abstraction and polymorphism
Vartec noticed this one Is a Java interface an abstract class
Interface cannot be instantiated ( Objects cannot be created). Interface provides the signature.
You can create objects from class.