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

Does garbage collection occur in permanent generation space in jvm?

816


Why synchronization is important in java?

788


What are the restrictions that are applied to the java static methods?

759


What is the purpose of the enableevents() method?

790


What is the diffrence between inner class and nested class?

814


What is a singleton factory?

724


What is the purpose of main function in java?

777


What is the use of generics? When was it added to the Java development Kit?

763


What does this mean java?

786


In how many ways we can do exception handling in java?

782


How can we make sure main() is the last thread to finish in java program?

934


What do you understand by classes in java?

763


What is a lightweight component?

793


What is %02d?

771


What is the maximum size of byte array in java?

760