How can we declare a variable whose value cannot be changed in Java?

Love and Share

Answer:   If we write the final keyword before the variable name, then the value of that variable
cannot be changed later in the program. Any attempt of doing so will produce a compilation
error.

Love and Share

Leave a Reply

Your email address will not be published. Required fields are marked *