What is differance between Abstract and Interface
Answers were Sorted based on User's Feedback
Answer / jasbir singh
An abstract class is a class with at least one function
without definitions.
An Interface is a class which only contains function
declarations, all the functions are specifically and
separately defined later. And you can't create objects of
these classes.
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / poorna chandar rao
diffrence bettwen the abstract class and interfaces
abstract class is having abstarct methods and concrete
methods abstarct class as compulosry having subclass for the
implementation abstarct methods and abstarct does not
support multiple inheritence
because one subclass extend the abstract class their is no
scope for extends for another class because it is not
support for the multiple inheritence
ex 1: abstract class one
2 class two extends one extend three (not valid)
but interface having only method signature in the interface
their is concrete method and it supports the multiple
inhirtence because
ex: interface one
class two implements one extends three(valid)
onc class implemens the interface and extends to another
class that is support the multiple inhertince
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / pankaj kumar upadhyay
abstract class contain an abstract function as well asather functions and variableand it must be defind in derived class and here we no create an object,
ex:
an SBI bank which follow the RBI Rules including it own rules.
while an interface class can contain only an abstract function, not any other functions or variables butit also must be defined in derive class .here also we dont create ao object.
ex:
an RBI follow only itself rules
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the difference between class and structure in C++?
Example for 4 pillar of oops like, Inheritance,Poly,Abstraction,Encabsulation ?
What is encapsulation oop?
how to find no of instances of an object in .NET?
write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation
1 Answers College School Exams Tests, HCL, IBM, TCS,
explain the concepts of oops?
Name an advantage of array over linked list?
24 Answers GML, IBM, Software Solutions,
What is abstraction in oop?
When a private constructer is being inherited from one class to another class and when the object is instantiated is the space reserved for this private variable in the memory??
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
sir plz send me a set of questions that been frequently held in written examination during campus selection.
How do you define social class?