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
Why is polymorphism important in oop?
What is object-oriented programming? Webopedia definition
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
What is constructor in oop?
What are the benefits of polymorphism?
Whats oop mean?
what is the sylabus for priliminaries?
• What are the desirable attributes for memory managment?
What are the advantages of polymorphism?
What language is oop?
What are the benefits of interface?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
Which method cannot be overridden?
What is basic concept of oop?
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?