Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

What are uses of Hash Code?

2 Answers   Cognizant,


Which package has light weight components in java programming?

0 Answers  


What is the difference between a method and a function in alice?

0 Answers  


if we give input as " hi how are you" then the output should be "uoy woh"...it should skip odd words in the input and should reverse even words from the end of string...can anyone help me to write this program in java

1 Answers  


What is a line break example?

0 Answers  






What is local declaration?

0 Answers  


How is java created?

0 Answers  


Explain about version control?

0 Answers  


Can we override a variable in java?

0 Answers  


By what default value is an object reference declared as an instance variable?

1 Answers   Wipro,


What is a boolean in java?

0 Answers  


Does java allow overriding static methods ?

0 Answers  






Categories