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

How can a dead thread be restarted?

1 Answers   IBM, Wipro,


life cycle of an applet?

3 Answers  


What are the ways to define classes that can be run as threads?

1 Answers   KPIT,


what is meant by JRMP?

0 Answers  


what is handle?

0 Answers  






What are the steps involved in developing an RMI object?

1 Answers  


how the action can be map from jsp page to bean class in mvc1

1 Answers   Photon,


what is DGC?

1 Answers  


1) which method of the RequestDispatcher cannot be called once the output is sent to the client? a. forward b. include c. both a&b 2) which interface should an object implement to get notified of changes to the list of active sessions in a web application? a. HttpSessionListener b. HttpSessionActivationListener c. HttpSessionAttributeLIstener 3) A user can select multiple locations from a list box on an HTML form, which of the following methods can be used to retrieve all the selected location? a. getParameter() b. getParameterValues() c. getParamValues() 4) which of the following methods should be used to send character text to the client? a. ServletResponse.getWriter() b. ServletResponse.getOutputStream() c. ServletResponse.getOut() 5) which implicit object is always available in a JSP page? a. exception b. session c. out 6) which inclusion mechanism doesn't include the source of the page, rather the output of the page. a. include directive b. jsp:include action c. Bothe a& b 7) which attribute of the page controls whether a page participates in session or not? a. session-allowed b. session c. isSession

1 Answers  


what are memory considerations of jsp compares to other web components?

0 Answers   TCS,


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

0 Answers  


What are the methods used for inter-thread communication? and in what class these methods are defined?

2 Answers  


Categories