Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


pradeep kumar
testone
2 Answer(s)      3 years and 9 months ago
Posted in : Java Interview Questions


what is the diffarence between interface and abstract class ?


Advertisement
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 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
Advertisements
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
Advertisements
 

 

 

DMCA.com