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 jee6?
When throw keyword is used?
What is the maximum size of a string in java?
What's the base class in java from which all classes are derived?
What is static data type in java?
What are the features of junit?
What is the relationship between clipping and repainting under awt?
Can we override private methods?
Is alive and join method in java?
What are the steps that are followed when two computers connect through tcp?
What is purpose of keyword void?
What is multithreading and its advantages?
What is the difference between final, finally and finalize() in java?
What are the restriction imposed on a static method or a static block of code?
What is ternary operator?