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

Brief description about local interfaces?

622


Should synchronization primitives be used on bean methods?

549


What is TL and its use?

1987


what is meant by JRMP?

1807


difference between  ejb,struts,hibernate,spring and jsp

2293






Can I import same package/class twice? Will the jvm load the package twice at runtime?

641


Is a class a subclass of itself?

585


Why a client should be multithreading? Explain.

585


Describe activation process?

2058


Name three subclasses of the component class?

610


When a thread blocks on i/o, what state does it enter?

568


Define aop(assepct oriented programing)?

630


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

6007


What is the relationship between an event-listener interface and an event-adapter class?

550


Is jvm a overhead?

619