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 IDisposal interface,IComparable,IEquatable,IFormatable

533


What is the process of Serialization?

563


Why do we need static class in c#?

574


What is an example of a delegate?

509


Can you drink alcohol with a loop recorder?

494






What are different types of classes in c#?

485


What is a streamwriter in c#?

508


Explain synchronous and asynchronous operations?

534


How long can loop recorders stay in?

616


Can we inherit singleton class in c#?

469


What are the ways in which client can create object on server in cao model?

513


Is c# code is unmanaged or managed code?

519


What are PE(Portable Executable)?

541


When a Static Constructor is called in a Class?

586


What is generic delegate in c#?

460