Share on Google+Share on Google+

pradeep kumar
2 Answer(s)      6 years and 8 months ago
Posted in : Java Interview Questions

what is the diffarence between interface and abstract class ?

View Answers

December 27, 2010 at 5:39 PM

Hi Friend,


1)An abstract class may contain complete or incomplete methods while Interfaces can contain only the signature of a method but no body.

2)An abstract class cannot support multiple inheritance, while an interface can support multiple inheritance.

3)One class can inherit multiple interface but it can't inherit multiple abstract class

For more information, visit the following link:



December 28, 2010 at 12:50 PM

JAVA have all alternatives:
1,CLASS- Class have only Concrete Methods.
2,ABSTRACT CLASS- Abstract class have both concrete methods and abstract methods.
3,INTERFACE-Interface have only abstract methods.
if u want any one specification u can use that.


Related Tutorials/Questions & Answers:
Java Applet - Adding a Button to Decrease a Total
{ public int testone = 0; public void init() { Button one = new Button...() { return testone; } public synchronized void increasetestone() { testone++; } } When you run this current code
DOJO xmlStore - Ajax
(inRowIndex){ return ' ' + inRowIndex; } function testOne
Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: TESTING is not mapped [FROM TESTING]
(); //Testing testOne = new Testing(8,"Naani",4500); List test_list...)ss.save(testOne); for (Iterator iter=test_list.iterator