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
How do you use parseint in java?
What is the difference between jdk and jre?
What is the use of list in java?
What is tostring () method?
Write a program to print count of empty strings in java 8?
What is difference between == equals () and compareto () method?
How to reverse string in java?
What is entry in java?
List the three steps for creating an object for a class?
Whats the difference between notify() and notifyall()?
How do you sort an array in java?
What is object-oriented paradigm?
what is the difference between Object Based Language and Object Oriented Language?
Explain purpose of sleep() method in java?
What is identifier in java?