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 the difference between the font and fontmetrics classes in java programming?
What is difference between final and immutable?
What does exclamation mean in java?
What are assembly attributes?
How do you create an array in java?
Write a program to print count of empty strings in java 8?
What are scalar data types?
What is the difference between conversation & casting?
What is object class in java?
What is the major advantage of external iteration over internal iteration?
What are the advantages and disadvantages of object cloning?
Do you know why doesn't the java library use a randomized version of quicksort?
Explain how can you debug the Java code?
What if I write static public void instead of public static void in java?
How do you declare a destructor in java?