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

What are different types of layout managers in java.awt package?

3 Answers   Android, CA,


How has the sandbox changed with Java 2?

2 Answers  


What is the difference between Process and Threads?

19 Answers  


How can I avoid validating a form before data is entered?

0 Answers  


What is the use of Semaphore?

3 Answers  


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

0 Answers  


What is servlet preinitialization?

3 Answers   iFlex,


What is private static final long serialVersionUID = 1L;

3 Answers   Google,


What is the O/P of the below Code Snippet ? And how does it imply the concept of call-by-value/call-by-reference. (Note : Pls ignore syntx errors) public class One { sop ("Into One--"); } public class Two extends One{ sop ("Into Two--"); } public class Home { One a; Two t; public static void main(argv[]) { sop ("In Home--"); sop(One.a); sop(Two.a); sop(One.t); sop(Two.t); } }

2 Answers   Wipro,


what is meant by JRMP?

0 Answers  


explain session tracking. why we used it

3 Answers   Lionbridge,


which book is better for jdbc ,servlets and jsp

0 Answers   TCS,


Categories