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

What is the basic concepts of OOPS?

936


How do you create an array in java?

766


how we can make a read-only class in java?

774


Explain about abstract classes in java?

820


Can a function return a function?

808


What is string and its types?

862


What is the use of keywords in java?

778


How many bits is size_t?

751


What is difference between public static and void?

714


What is meant by interface?

803


Do I need java on my pc?

741


What is console based application in java?

804


What is string in java is it a data type?

756


What is classname class in java?

769


What is Java Shutdown Hook?

851