diff between Abstract class Interfaces?

Answers were Sorted based on User's Feedback



diff between Abstract class Interfaces?..

Answer / anu mehra

abstract classes contain
1)abstract as well as non abstract method
2) to inherit we use extends keyword

Interface
1) all methods are abstract ,public and static
2) all variables are public , static and final
3) to inherit we use implements keyword
4) interface can extend another interface

Is This Answer Correct ?    3 Yes 0 No

diff between Abstract class Interfaces?..

Answer / pramod kumar sharma

abstract class contains the at list one abstract methods and abstract methods contain the only declaration but no definition.

interface contain all methods abstract methods only.

Is This Answer Correct ?    2 Yes 2 No

diff between Abstract class Interfaces?..

Answer / dhanya

Any class with one or more abstract method is called an abstract class.It can have data attributes,concrete methods and constructors.Abstract class can differ the implementation
by declaring the method to be abstract,and a Java interface declares only the contract and no implementation.All methods declared in interface are public and abstract.All attributes are public,static and final.

Is This Answer Correct ?    0 Yes 0 No

diff between Abstract class Interfaces?..

Answer / latha

abstract class contains the abstract methods. these methods
contain the only declaration but no definition.

interface is the class which extends the many interfaces.
and the class implements the many interfaces

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More OOPS Interview Questions

Please send ford technologies placement paper 2 my mail id

0 Answers  


What is encapsulation with real life example?

0 Answers  


What is ambiguity in inheritance?

0 Answers  


What is debug class?what is trace class? What differences are between them? With examples.

0 Answers  


Which is faster post increment or pre increment ? and in which cases should u use either - to increase speed?

4 Answers   EA Electronic Arts,






What are the 3 pillars of oop?

0 Answers  


what is single inheritance?

18 Answers   IBM,


What is Inheritance, Multiple Inheritance, Shared and Repeatable Inheritance?

4 Answers   Accenture, L&T,


What is difference between polymorphism and inheritance?

0 Answers  


When is it necessary to use member-wise initialization list in C++?

2 Answers   Adobe,


What is difference between inheritance and polymorphism?

0 Answers  


How Do you Code Composition and Aggregation in C++ ?

3 Answers   IBM, NET,


Categories