Answer Posted / jayant gope
Final is keyword that can be used with class, method and also with the variable.
Class: When final is used with the class, it means that class cannot be further extended or inherited by the other classes. So, final keyword restricts class from being inherited.
Method: When final is used with the method, this means that method cannot be overridden.
Variable: When final is used with the variable, it makes the variable constant i.e. the variable cannot be further modified.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
'A class is a template for an object' explain this statement.
What is the static block?
What is the difference between a choice and a list?
Why a dead thread occurs?
What is a cup of java?
What is an example of a conditional statement?
What is mean by exception?
What are the changes in java.io in java 8 ?
Which method cannot be overridden in java?
In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?
What is the syntax and characteristics of a lambda expression? Explain
What are bind parameters?
What is the difference between multiple processes and multiple threads?
What are the topics in core java?
Can a class with private constructor be extended?