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
Explain what is Marker interface?
How will you initialize an Applet?
What is an accessor?
List two java ide’s?
What are three types of loops in java?
Can a constructor be private and how are this() and super() method used with constructor?
How objects of a class are created if no constructor is defined in the class?
Difference between string, string builder, and string buffer?
Why convert an applet to an application?
What is the properties class in java programming?
Can a constructor be made final?
What is difference between final and immutable?
Explain throw keyword in java?
Explain public static void main(string args[]).
What is nullpointerexception?