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
What is the difference between encapsulation and polymorphism?
How do you define a class in oop?
What is the highest level of cohesion?
Can we create object of abstract class?
What are the benefits of polymorphism?
Can static class have constructor?
Why is polymorphism needed?
What is the use of oops?
#include
What is pointer in oop?
How many human genes are polymorphic?
Whats oop mean?
what is difference between class template and template class?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
What is abstraction example?