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
Is main a function?
What is the map interface in java programming?
what is daemon thread and which method is used to create the daemon thread? : Java thread
What are triggers in DB? Explain their types. How do they work?
What do negative exponents mean?
Is call by reference possible in java?
What is null statement?
Is multiple inheritance supported by java?
What exceptions occur during serialization?
What is an empirical question?
Can we override final method?
Why is multiple inheritance not supported in java?
What is an infinite loop in java? Explain with an example.
Why is stringbuffer called mutable?
Can main() method in java can return any data?