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...


I have a class which is abstract which contains only the
abstract methods. This is similar to an interface. Then, if
i have given a choice to choose one of them. Which one i
have to choose and why?

Answers were Sorted based on User's Feedback



I have a class which is abstract which contains only the abstract methods. This is similar to an in..

Answer / venu

i preferred to choose interface bcoz
if i implement interface still i have a chance to extend
another class

Is This Answer Correct ?    5 Yes 0 No

I have a class which is abstract which contains only the abstract methods. This is similar to an in..

Answer / harikrishna

you never get a chance to choose a method from abstract
class,because if you are writing a abstract class you
have to provide implementation to all the methods in
subclass otherwise you should declare that subclass as
Abstractclass.

Is This Answer Correct ?    2 Yes 1 No

I have a class which is abstract which contains only the abstract methods. This is similar to an in..

Answer / madhav

Interface is preferable to Abstract class as when ever in
instance is created for subclasses of this,constructors
will be called hirarchially consuming some time for each
constructor call..

Is This Answer Correct ?    0 Yes 0 No

I have a class which is abstract which contains only the abstract methods. This is similar to an in..

Answer / ashoka

Better to choose Abstract class. Because it contains not
only the abstract methods but also implemented methods but
in interfaces only unimplemented methods will be there and
all final variables will be there.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

Are functions objects in java?

0 Answers  


What is java class writing rules?

1 Answers   Oracle,


What is difference between static variable and global variable?

0 Answers  


What about main() method in java ?

0 Answers  


What is difference between iterator access and index access?

0 Answers  


Difference between the paint() and repaint() methods?

1 Answers  


Are there structures in java?

0 Answers  


How are destructors defined in java?

0 Answers  


What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?

0 Answers  


Does java runtime require a license?

0 Answers  


Why we should declare the variables as static and final in interfaces?

1 Answers  


In how many ways we can the thread? in java

3 Answers  


Categories