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

Why stringbuffer is faster than string?

541


How can we make string upper case or lower case?

602


Is java a utf 8 string?

532


What do you understand by final value?

590


When parseint method can be used?

541






Can we sort array in java?

529


How to optimize the javac output?

602


What is complexity and its types?

526


What are different types of control structures?

495


How many unicode characters are there?

558


Why is static used?

553


Explain restrictions for using anonymous inner classes?

589


How many types of memory areas are allocated by jvm?

562


how to convert Java project into Maven ?

585


Write a program to print count of empty strings in java 8?

538