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
Describe the Big-O Notation.
Why does java does not support multiple inheritance? Explain
When parseint method can be used?
What are functions in java?
What is currentthread()?
What is the use of http-tunneling in rmi?
If a method is declared as protected, where may the method be accessed?
Is 0 a prime number?
Explain a few methods of overloading best practices in java?
Why can't we use static class instead of singleton?
Explain about procedural programming language or structured programming language and its features?
What does singleton mean in java?
What is listnode in java?
What is array sorting in java?
What does business logic mean?