Describe what an Interface is and how it?s different from a
Class.
Answer Posted / seamus barrett
An interface represents a contract between a class and its clients (the classes and functionality that consume the class). A class that implements an interface makes available to it's clients a collection of methods and properties as defined by the interface. As a class evolves (as the code changes) the contract between class and its client remains intact so long as the interface is unchanged. This allows a class to grow without requiring its clients to be rebuilt.
Difference? A class can be instantiated into an object that provides functionality to the instantiating function while an interface cannot be instantiated.
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Where is pseudocode used?
What is the real life example of polymorphism?
Whats is abstraction in oops?
Why is polymorphism used?
What is polymorphism oop?
Which is not an object oriented programming language?
I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...
what are the ways in which a constructors can be called?
What is debug class?what is trace class? What differences are between them? With examples.
What are the three parts of a simple empty class?
to find out the minimum of two integer number of two different classes using friend function
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?
What is balance factor?
Plese get me a perfect C++ program for railway/airway reservation with all details.
What is abstraction and encapsulation?