How do you use final keywords and final variables in Java?

Answers were Sorted based on User's Feedback



How do you use final keywords and final variables in Java?..

Answer / nashiinformaticssolutions

Java programmers are unable to alter the value of variables of basic data types when they use final keywords with them.
When final is used with non-primitive variables, the members of the referred object cannot be altered.

Is This Answer Correct ?    0 Yes 0 No

How do you use final keywords and final variables in Java?..

Answer / glibwaresoftsolutions

Java programmers are unable to alter the value of variables of basic data types when they use final keywords with them.

When final is used with non-primitive variables, the members of the referred object cannot be altered

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

I was asked to draw the class diagram for the below scenario which should obey OOPS concept. A Portal is to be developed for a school , which has 3 main divisions viz , Education , Admin & Trust. Each division has 2 sub divisions Kinder Garden & Higer Secondary.

3 Answers   Amtek, Huawei,


What is inheritance?

5 Answers   Accenture, Hexaware, Syntel,


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

0 Answers  


Explain naming conventions for packages?

0 Answers  


Hi buddy, well i got that there is always a default constructor with abstract class. OK. But why not with interface? Thanks in advance.

2 Answers  


Can you call a private data from an inner class?

6 Answers  


What are the concepts of 'OOPS'?

0 Answers   Atos Origin,


Can an interface be defined inside a class?

0 Answers  


What is difference between core java and java ee?

0 Answers  


What is the applet security manager, and what does it provide?

0 Answers  


What are JVM.JRE, J2EE, JNI?

0 Answers  


What are the differences between getting and load method?

0 Answers  


Categories