what is the Scope of Final Keyword in Java?



what is the Scope of Final Keyword in Java?..

Answer / 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

More Advanced Java Interview Questions

can we write implementation for a method with in another method?

3 Answers   Cap Gemini,


What classes of exceptions may be caught by a catch clause?

1 Answers  


What is the difference between the string and stringbuffer classes?

1 Answers  


What if the static modifier is removed from the signature of the main method?

1 Answers  


if i know the lenght of collection in hand, should I use Array or Arraylist? justify

1 Answers   iTrust,


Write a program on RMI and JDBC using StoredProcedure?

1 Answers  


How would you detect a keypress in a jcombobox?

1 Answers  


Explain the different types of memory used by jvm?

1 Answers  


Which textcomponent method is used to set a textcomponent to the read-only state?

1 Answers  


Have you used threads in Servelet?

1 Answers   Satyam,


What is serialization and de-serialization ?

5 Answers  


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

1 Answers  


Categories