Java Literals

A constant value in Java is created by using a literal representation of it. For example,
here are some literals:

an integer literal 100
floating-point literal 98.6
character constant literal ‘X’
string literal “This is a test”.

A literal can be used anywhere a value of its type is allowed.

java java tutorials learn java study java