What is the difference between data types and literals in Java?
A literal is a constant value which is compatible to a datatype, a literal is used to assign a value to variable, to compare values or define constants. See JLS 3.10.
e.g:
int varOfDataTypeInt = 123; String s = "string literal";