what are the differences between final,finally,finalize
methods?

Answer Posted / ambika

final is a keyword.its constant.it cant be changed from its
initiated value.

finally() method used exception handling concept.finally()
block will execute whether or not try block can be execute.
its used to close a file.

finalize is used when an object is just before deleted,it
can be used in garbage collection.

Is This Answer Correct ?    96 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How transient variable is different from volatile variable?

565


What is double in java?

519


hr interview how many minutes asking question

1571


What happens if an exception is throws from an object's destructor?

587


why are there separate wait and sleep methods? : Java thread

578






How do you define a parameter?

585


List primitive java types?

597


Can an abstract class be a final class?

531


How do you classify Dialog Box?

649


Is main a function?

517


Is java a prime method?

554


What is an accessor?

1053


Can a string be null?

544


Can we use synchronized block for primitives?

606


Mention some interfaces implemented by linked list in java.

544