Explain final, finalize() and finally?
Answer Posted / dwr
final varibles are unchangeble.
final classes are not subclassed.
final methods are not overriden.
finilize()
to clean up memory resourses for object using finilize().
finally block is executed if exception thrown or not.
Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What is the purpose of a transient variable?
What is widening and narrowing in java? Discuss with an example.
What’s the difference between the methods sleep() and wait()?
How do generics work in java?
What is dynamic binding(late binding)?
Difference between error and exception
What data type is string java?
How to make object serializable in java?
What is meant by overloading?
What is a nonetype?
How the metacharacters are different from the ordinary characters?
What is string in java is it a data type?
How will you communicate between two applets?
Explain the difference between collection api and stream api in java8?
1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?