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


Please Help Members By Posting Answers For Below Questions

What is the purpose of a transient variable?

575


What is widening and narrowing in java? Discuss with an example.

552


What’s the difference between the methods sleep() and wait()?

534


How do generics work in java?

514


What is dynamic binding(late binding)?

578






Difference between error and exception

4996


What data type is string java?

529


How to make object serializable in java?

540


What is meant by overloading?

582


What is a nonetype?

557


How the metacharacters are different from the ordinary characters?

558


What is string in java is it a data type?

527


How will you communicate between two applets?

625


Explain the difference between collection api and stream api in java8?

501


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?

3776