The value of
x is 10, and 10 is a literal which holds the constant 10 but
x is not a constant.
Value constant and literal do not mean the same thing.
A literal is where you write the value in the code e.g. 10, "Ganish Patil", rather than a formula 5 × 2.
A constant is a value which never changes.
There is a specific meaning for the term
constant expression (often called
compile‑time constant) in the
Java® Language Specification, but that may be difficult to read.