pradeep kumar
testone
2 Answer(s)      2 years and 5 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,

Differences:

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:

http://www.roseindia.net/java/master-java/interface.shtml

Thanks


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 Pages:
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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.