when,where and how to use abstract class and interface

Answer Posted / vinaykumar

If you want to provide your own services for methods we
use interfaces.If you want to provide your own services or
to use the services of the methods in your class then wego
for abstract classes.abstract class is partially implemented
and partially unimplemented class where as interface is
completely unimplemented.both of the objects can not be
created.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a ?

976


How does the java compiler work?

744


How do you declare a string variable?

761


What is an accessor?

1351


What is the difference between a vector & an array list?

928


How many return statement are allowed in a function?

672


What is difference between arraylist and list in java?

837


What does bitwise or mean?

832


how to run ecllipse with jettyserver for windows environment using batch file

1737


How does arraylist work in java?

801


What is printwriter in java?

736


What is java object name?

765


What are default methods ?

800


Can we assign the reference to this variable?

749


Can we declare a class as abstract without having any abstract method?

788