testone

testone

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 Tutorials/Questions & Answers:
testone
ModuleNotFoundError: No module named 'testone'
ModuleNotFoundError: No module named 'testone'  Hi, My Python... 'testone' How to remove the ModuleNotFoundError: No module named 'testone... to install padas library. You can install testone python with following command
Advertisements
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

Ads