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 the string function?

750


What is java util concurrentmodificationexception?

710


What do you mean by inner class in java?

760


What are the different collection views provided by maps?

766


What is a arraylist in java?

762


What is the difference between processes and threads?

764


What is a double?

825


Explain how hashmap works?

809


What is the difference between static method and instance method in Java?

815


what is heap memory?

854


Which data type is class in java?

775


Why use string handling in Java?

797


What type of language is java?

763


What is abstraction in java?

826


Explain java heap space and garbage collection?

795