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


Please Help Members By Posting Answers For Below Questions

assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1659


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

2138


How do you achieve runtime polymorphism?

561


What is ambiguity in inheritance?

616


What is static modifier?

623






What is inheritance write a program to show use of inheritance?

604


What is the highest level of cohesion?

566


how to get the oracle certification? send me the answer

1654


What is difference between polymorphism and inheritance?

610


What is an example of genetic polymorphism?

643


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

1644


can inline function declare in private part of class?

3646


What is multilevel inheritance in oop?

547


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1445


What is the difference between procedural programming and oops?

545