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

Can you name some types of inheritance?

0 Answers   Motorola,


define oops with class and object

5 Answers   HCL, Tech Mahindra,


how to write a java program for an output ****0 ***01 **012 *0123 01234

1 Answers  


write a programe to calculate the simple intrest and compund intrest using by function overlading

0 Answers  


How do you answer polymorphism?

0 Answers  






c++ is a pure object oriented programming or not?

5 Answers   Wipro,


WAP to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

1 Answers  


Why we are use # in begning of programme of c++.

2 Answers   Syntel,


write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.

4 Answers  


What is interface in oop?

0 Answers  


Get me a number puzzle game-program

0 Answers  


What are the two different types of polymorphism?

0 Answers  


Categories