can u give one sinario when you use Abstract Class and When
you use Interface.

Answer Posted / srinivasa

If there are multiple objects which use common methods and
different implementaion of methods We use Abstract class.

If multiple objects use different implementation of methods
for every object we use interface.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are constructors used?

649


Why synchronization is important?

670


How to retrieve data from database in java using arraylist?

627


Why we override equals() method?

659


What is java virtual machine? Explain

657






What class allows you to read objects directly from a stream?

980


What class allows you to read objects directly from a stream in java programming?

620


Is zero a natural number?

663


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

720


What is singleton service?

592


java program with complete 4 oops concepts implemented example

2809


Can a class with private constructor be extended?

588


Write a java program to check if a number is prime or not?

639


What is thread start?

613


Explain about version control?

671