Explain final, finalize() and finally?
Answer Posted / venkataramana
final is a keyword.
we can use the final keyword in different context.
final keyword can be used with 1.Variables
2.Methods
3.Classes
When we use the final keyword with variables ,the value of
the final variable will not be changed i.e its value will be
fixed .
when we use the final keyword with methods, that is the
final method cannot be overridden.
when we use the final keyword with classes, that is the
final class cannot be extended to subclasses.
Finally() block is followed after try() or catch() block.
Finall() block executed even though if there the exception
having or not in the program.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is string data?
if u open login & logout ,how can udisplay the timelogin & logout members ?
What is data type example?
What is the final keyword denotes?
Why are the objects immutable in java?
what is the difference between yielding and sleeping? : Java thread
What is cr keyboard?
What are void pointers?
Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.
What are checked exceptions?
What do you mean by an object in java?
How to perform linear search in java?
Define packages in java?
What is unicode in java?
What is an object in java?