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

Answer Posted / raghavendra

final key word is a modifier,and you cant perform any
modifications
finally : finally is used one type exception.suppose any
exception is generated,closed entire program suddenly,so
damage the remain information.overcome this disadvantage
introduce the finally key word.you write any information in
finally block,the information is successfully executed
finalize:this is one type of garbage collector,this key can
be used to collected unused memory

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to display all the prime numbers between 1 and n (n is the number, get the input from user)

517


What is prefix of a string?

580


What is method in research paper?

577


What does g mean in regex?

570


What is type conversion in java?

585






How are destructors defined in java?

578


What is the use of static class?

550


What is ‘has a’’ relationship in java?

727


For class CFoo { }; what default methods will the compiler generate for you>?

622


why java uses class level type casting ?

2257


List any five features of java?

572


How do you define a set in java?

519


Mention some interfaces implemented by linked list in java.

545


What is collection sort in java?

559


Can we print null in java?

577