KnowledgeBoat Logo

Computer Applications

Define the following with an example:

constant

Values & Data Types Java

ICSE

42 Likes

Answer

The keyword final before a variable declaration makes it a constant. Its value can't be changed in the program.

Example:

final int DAYS_IN_A_WEEK = 7;

Answered By

27 Likes


Related Questions