What is the final keyword?



What is the final keyword?..

Answer / Najir Husen

The final keyword in Java is used to restrict a method or a variable from being overridden by subclasses, or it can also be used to declare that an object of a class cannot be instantiated. For methods, once they are declared as final, they cannot be overridden by any subclass, and for variables, they can only be assigned a value once at the time of declaration.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can I overload to string method

1 Answers   UHG,


How arrays are stored in memory in java?

1 Answers  


How do you compare two objects?

1 Answers  


What are the differences between include directive and include action?

1 Answers  


What environment variables are required to be set on a machine in order to run Java programs?

1 Answers   Tech Mahindra,


how to run ecllipse with jettyserver for windows environment using batch file

1 Answers  


Why we use methods in java?

1 Answers  


What is the use of java?

1 Answers  


What are the benefits of immutable objects?

1 Answers  


What is a stream? what are the different types and classes of Streams?

2 Answers  


Why set do not allow duplicates in java?

1 Answers  


What about method local inner classes or local inner classes in java?

1 Answers  


Categories