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

What is size_t?

0 Answers  


How to run a JAR file through command prompt?

0 Answers  


What is a JAR file?

0 Answers  


If an application has multiple classes in it, is it okay to have a main method in more than one class?

0 Answers  


What is a variable simple definition?

0 Answers  


Is it compulsory for a try block to be followed by a catch block in java for exception handling?

0 Answers  


Is null == null in java?

0 Answers  


what is anonymous class in java?

0 Answers  


Explain java coding standards for constants?

0 Answers  


how session will be expired?

5 Answers   CybAge, Infosys,


What type of variable is gender?

0 Answers  


What is the collection interface?

0 Answers  


Categories