what is the Scope of Final Keyword in Java?

Answer Posted / sumitpalsingh

Final Keyword has limited Scope because it is like a constant keyword.

If we declare a class As "final" then we can not extends this class.so we can not get benifit of inheritance class.

If we declare a method as "final" then we can not override this method.Becoz metgod overriding is not possible with final keyword.

If we declare a variable as "final" then we can not change the value of final varible .because these are the constatnt variable having fixed value if we use "final" keyword with a variable.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the steps in details to load the server object dynamically?

4550


What is a sessionfactory? Is it a thread-safe object?

688


In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?

589


If your ui seems to freeze periodically, what might be a likely reason?

553


Why do I get a duplicate name error when loading a jar file?

550






What are the steps to write p-to-p model application?

1968


What is difference between object state and behavior?

587


Explain how will the struts know which action class to call when you submit a form?

529


How a component can be placed on Windows?

2273


Why won’t the jvm terminate when I close all the application windows?

760


Name three component subclasses that support painting?

620


How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!

2562


What is the difference between java class and bean?

587


Why are my checkboxes not being set from on to off?

650


What modifiers may be used with an inner class that is a member of an outer class?

580