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
What is an empty list in java?
What is loop in java?
Explain about version control?
Explain the scope of a variable.
What does %d do in java?
What are the differences between path and classpath variables?
What is the largest long allowed by java?
What is int short for?
What is a vararg?
Why hashcode is used in java?
What invokes a thread's run() method in java programming?
What is class forname?
How is it possible for two string objects with identical values not to be equal under the == operator?
Is static variable stored in heap?
What is parsing a sentence?