Answer Posted / amit patel
Abstract class is used to implement common behavior which is
required by all subclasses but have some behavior which is
specific to subclass.
E.g., you want to implement a DocumentViewer App. Basic
operations are like open, view and close. open and close
requires no specific implementation while view require
specific implementation. Make DocumentViewer abstract,
implement open, close and make view as abstract. Now view is
responsibility of subclass. Like PDFViewer will have own
implementation for view()
Is This Answer Correct ? | 14 Yes | 1 No |
Post New Answer View All Answers
What is stringjoiner ?
What is __ init __ functions?
Can we extend a class with private constructor?
How can we create a synchronized collection from given collection?
How do you start a thread?
Can private method static?
How is it possible in java programming for two string objects with identical values not to be equal under the == operator?
How is string immutable in java?
Is java 9 released?
Explain the scope of a variable.
What is meant by main method?
What is the purpose of a default constructor?
Can we serialize arraylist in java?
What is the exact difference in between Unicast and Multicast object?
What is the use of protected in java?