Describe what an Interface is and how it?s different from a
Class.
Answer Posted / amit upadhyay
interface is collection of abstract method.we can not
define any method in interface.we can implement that
abstract method by using the class.there is a restriction
in interface that you have to implement all the abstract
method in the class which is declared in interface.and we
can not create an object of interface.if we want to execute
the interface method then we have to implement first that
interface in any class after that create the object of
class ,then we can access execute that method
but in class we have to define the methods, which is
declered.we can also access that method through the object
of the class.
| Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
What is the types of inheritance?
What is for loop and its syntax?
What is and I oop mean?
What is coupling in oops?
What is purpose of inheritance?
What does oop mean in snapchat?
why reinterpret cast is considered dangerous?
can inline function declare in private part of class?
What is the fundamental idea of oop?
Prepare me a program for the animation of train
What is multilevel inheritance explain with example?
What do you mean by abstraction?
What is the full form of oops?
What is protected in oop?
What are benefits of oop?