adspace
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 the difference between equals() and == in java?
Write a program to print count of empty strings in java 8?
Differentiate between static and non-static methods in java.
What is parsing in java?
Realized?
What is a constructor overloading in java?
What do you mean by an interface in java?
What is the difference between break and continue statements?
What is an object in java and how is it created?
What is a classloader in java?
explain different ways of using thread? : Java thread
Write a program to find the whether a number is an Armstrong number or not?
How to create a base64 decoder in java8?
Is minecraft 1.15 out?
What are the differences between heap and stack memory in java?