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 does the @override annotation do?

552


What is the default value of the local variables?

499


Why java is made?

559


What is a concrete classes? Is Java object class is concrete class?

504


What is the difference between Java1.4 and Java1.5

1821






explain copyonwritearraylist and when do we use copyonwritearraylist?

530


What is double in java?

506


What are the advantages of assembly language?

493


Can we sort a map in java?

570


Difference between current previous versions of Java?

549


What is the use of join method?

567


In java, what is the difference between method overloading and method overriding?

576


How concurrent hashmap works?

603


What are drawbacks of singleton class?

516


What is this keyword in java?

561