Define constant with an example.
11 Likes
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
6 Likes
State two kinds of data types.
What do you mean by a variable? Explain with an example.
What do you understand by primitive and non primitive data types? Give two examples of each.
What do you understand by Token? Name different types of tokens used in Java.