what is abstrac class? why it is use?

Answer Posted / ramavtar rajput

abstract classes and methods. It is not allowed to create an
instance of a class that has been defined as abstract. Any
class that contains at least one abstract method must also
be abstract. Methods defined as abstract simply declare the
method's signature they cannot define the implementation.

When inheriting from an abstract class, all methods marked
abstract in the parent's class declaration must be defined
by the child; additionally, these methods must be defined
with the same (or a less restricted) visibility. For
example, if the abstract method is defined as protected, the
function implementation must be defined as either protected
or public, but not private.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is warning – “cannot modify header information – headers already sent”?

622


Tell me is it possible to remove the html tags from data?

525


How to concatenate two strings in php?

530


How to remove blank spaces from the string?

532


What is a helper function?

537






What is the use of curl()?

626


What is the best way to avoid email sent through php getting into the spam folder?

546


Why do you need php?

518


What is the difference between javascript and php?

519


Explain Traits in PHP?

523


What is the difference between explode and split?

486


What is the goto statement useful for?

545


Which framework is best for php development?

488


Is php a backend?

526


Does php 5 support exceptions?

674