int age = 10;
, the literal value 10 represents a known quantity, the age of a person.int x = 5;
, the literal value 5 is assigned to a variable x. This means that the literal represents the value that the variable holds at a particular point in time. The variable x can be changed and take on different values during the execution of the program.final int MAX_VALUE = 100;
, the literal value 100 is used to initialize a constant MAX_VALUE. The constant represents a fixed value that cannot be modified later in the program.FREE
| Start Free Test |
![]() |
Explore Courses for Class 6 exam
|
|
![]() |
Explore Courses for Class 6 exam
|
|