Answer Posted / user
One scenario where final is important, when you want to prevent inheritance of a class, for security reasons. This allows you to make sure that code you are running cannot be overridden by someone.
The best example is
public final class String
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is multithreading and its advantages?
Name few "optional" classes introduced with java 8 ?
What are the methods used to implement for the key object in the hash map?
What is the synonym of framework?
How do you define a singleton class?
Explain about member inner classes?
What are the ways to instantiate the class class?
How do you declare a string variable?
What is the difference between serializable and externalizable interfaces?
Does printwriter create a file?
What is fundamental datatype?
How many wrapper classes are there in java?
Can you pass by reference in java?
Can a hashset contain duplicates java?
How do I start learning java?