abstract vs interface vs concrete class:
==============================
1.Abstract:
==========
==>abstract class talks about implementation but not completely.
==>It contains some implemented methods and some abstract methods.
==>We cannot create object for abstract classes.
==>We can execute the constructor for abstract classes through their child classes.
2.interface:
=========
==>Interface only contains abstract methods i.e it never talks about implementation.
==>It is fully abstract.
==>We cannot create object for interfaces and we cannot execute constructor for interfaces.
3.concrete class:
=============
==>Concrete class completely talks about implementations.
==>It is ready to provide service.
==>We can create object for concrete classes.
==>We can execute the constructors as well.
==============================
1.Abstract:
==========
==>abstract class talks about implementation but not completely.
==>It contains some implemented methods and some abstract methods.
==>We cannot create object for abstract classes.
==>We can execute the constructor for abstract classes through their child classes.
2.interface:
=========
==>Interface only contains abstract methods i.e it never talks about implementation.
==>It is fully abstract.
==>We cannot create object for interfaces and we cannot execute constructor for interfaces.
3.concrete class:
=============
==>Concrete class completely talks about implementations.
==>It is ready to provide service.
==>We can create object for concrete classes.
==>We can execute the constructors as well.
this answer to crack the interview thank you....
ReplyDelete