What?s the difference between an interface and abstract class?

Answer Posted / rambabu gonela

java does't support multiple inheritance..to overcome this
problem.. java introduce new concept that is interface,
we cannot intantiate both interface and abstractclass.1)by
default in interface variables are public,static and final,
in abstract class we have to declare explicitly 2) methods
in interface public,nonstatic and abstract,where as in
abstract class we have to give....
3)we can implements more than one interfaces.. but we can
extends only one class..

Is This Answer Correct ?    7 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the interface in c#?

514


Explain the difference between the system.array.copyto() and system.array.clone()?

499


Why do we need private constructor in c#?

470


Explain the differences between static, void and public in c#?

529


What does xpath return?

541






What is the difference between private and protected in c#?

502


Any problem found in vs.et

588


In gridview in editmode if we want to display information in one combobox based on

1826


What is a cs file?

524


Why do we need delegates in c#?

496


What is difference between overloading and short circuiting?

469


What is type system in c#?

523


What is datarelation c#?

465


Does c# have its own class library?

552


How can I get around scope problems in a try/catch?

483