What are the difference between abstract class and interface?

Answer Posted / muinuddin khan

In abstract class aleast one method must be abstract(only
declared not define).we can create object of abstract class.
if we want to use this class then we have to inherit it.


In interface all the method must be abstract(only define).
using interface we can achieve multiple inheritence.
we use interface where one class cannot extend more than
one class(in java).

Is This Answer Correct ?    15 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Inside a php function, what param needs to be set in order to access a global variable?

537


Where is session value stored php?

531


What is the name of scripting engine in php?

677


Tell us how can we access the data sent through the url with the post method?

517


What is difference between strstr() and stristr() in PHP?

539






Why does php need server?

517


What is the use of "enctype" attribute in a html form?

521


What is difference between php and wordpress?

502


What is the difference between overloading and overriding in php?

535


In php, how to redirect from one page to another page?

513


Will php die?

524


What is putenv?

563


Which php global variable is used for uploading a file?

504


what are the differences between php and perl

1603


What is the difference between fopen() and fclose()?

582