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

how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.

1750


Is “abc” a primitive value?

615


how i secure my site with the https protocol.what are the steps?

1734


What are local interfaces? Describe.

697


How to deploy Jar, War files in J2EE?

2169






How is a java object message delivered to a non-java client?

571


What does module-relative mean?

573


what are getters and setters in Java with examples?

1284


What class is the top of the awt event hierarchy?

574


Define aop(assepct oriented programing)?

631


What is a clone?

572


Explain the advantages and disadvantages of detached objects.

575


What is the difference between the session.get() method and the session.load() method?

598


What is jboss?

571


Name the class that is used to bind the server object with RMI Registry?

1692