I have following method (example).
What does final keyword represent here?Code:
public static final String getString(){
return "Welcome";
}
I am able to call this and it works fine. How does final makes this special.
Printable View
I have following method (example).
What does final keyword represent here?Code:
public static final String getString(){
return "Welcome";
}
I am able to call this and it works fine. How does final makes this special.
The old tutorial had a section in it on "Final Methods" that appears to have been omitted in the new tutorial.
Basically, it means that you cannot override the method.
Ok, so method definition is final and cannot be overridden.
Thankyou hardwired.