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
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is abstraction in oop?
What does enum stand for?
Why is oop useful?
What is class in oop with example?
What is property in oops?
What is a class oop?
What is object in oops?
Where is pseudocode used?
Write a program to sort the number with different sorts in one program ??
How long to learn object oriented programming?
What is stream in oop?
What are the three parts of a simple empty class?
What is encapsulation with real life example?
How does polymorphism work?