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 are static initalizers in java ?
What is variable argument in java?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
What is exception handling in java?
Can you sort a string in java?
What is the difference between array and array list in java?
Can keyword be used as identifier?
What is a string token?
what is server side caching?
What is independent and dependent variables in research?
Write a code to create a trigger to call a stored procedure
What is mutable object and immutable object?
What is the size of string?
Can I use % with real numbers?
Explain 5 features introduced in jdk 1.7?