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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between synchronized and synchronized block?

771


Explain how can you debug the Java code?

814


Why is the singleton pattern considered to be an anti pattern?

657


What is use of super keyword in java?

793


Define an applet in java?

825


How do you know if a value is nan?

786


Which is better ascii or unicode?

750


What is lastindexof in java?

748


What do you understand by abstract classes?

821


What exactly is java?

696


Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.

822


What two classes are used to read data only?

838


Can a boolean be null java?

730


What is module with example?

678


How do you differentiate abstract class from interface?

724