+ 1
What are literals?
2 Answers
+ 1
A literal is a value that can be written directly into a Java program. The compiler can calculate the value it represents because most primitive data types have their own literal pattern.
Literal we mean any number, text, or information  that represents a value. For instance;
int month = 10;
In the above statement the literal is an integer value i.e 10. The literal is 10 because it directly represents the integer value.
0
literal is constant int a=6; here 6 is constant(literal)