Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is difference between Interface and abstract class

Answers were Sorted based on User's Feedback



what is difference between Interface and abstract class..

Answer / naveen

Interface is a specification it tells a class has what to do.
It is purely abstract class it contains abstract methods and final static variables.
Generally begining of the project PM or TL are providing the Interfaces, developers are implementing the Interfaces.

Abstract class

Abstract class is a mediator between Interface and Class , any common code is their that code written in Abstract class and then extend the Abstract class. Abstract class containing abstract and concreate methods.
Abstract class are used in Designing level.If take java predifined class we understand easily.

Is This Answer Correct ?    8 Yes 0 No

what is difference between Interface and abstract class..

Answer / surender kannuri

interface is a specification of method prototype.

all methods in interface are abstract and final.

interface methods are public since they should be available
to third party vendor to provide implementation.they are
abstract because their implementation is left for third
party vendors.


interface contains 0 or more abstract methods.

all methods of interface should implemented in implemented
class.if any method is not implemented then implementation
class should be declared as abstract.

we can't create object to interface.but we can create
reference to interface type.

an interface contains variables ,such as public.static and
final variables.this means all variables of interface are
constant.

an interface cannot implements another interface.
an interface can extend another interface.

it is possible to write a class within an interface.
a class can implements(not extend) multiple interfaces.


abstract class contains 0 or more abstract methods.
all methods of abstract class should be implemented in
subclasses only.
all methods of abstract class should be declared by using
abstract keyword.
we can't create an object to abstract class.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Core Java Interview Questions

explain the life cycle of thread?

10 Answers   CTS, NIIT, TCS,


What is the % operator?

2 Answers  


What does string intern() method do?

0 Answers  


How does multithreading take place on a computer with a single cpu in java programming?

0 Answers  


What is difference between classpath and path variables in java?

0 Answers  


What does the “static” keyword mean? Can you override private or static method in java?

0 Answers  


what is use of functional interface in java 8?

0 Answers  


What do you understand by java virtual machine?

0 Answers  


What is java lang object?

0 Answers  


What is the difference between dom and sax parser in java?

0 Answers  


Describe 2 different ways to concatenate two strings.

0 Answers   TCS,


Does sprintf add a null terminator?

0 Answers  


Categories