Literals in Java – Integral, Floating-Point, Char, String, Boolean BY DATAFLAIR TEAM · UPDATED · AUGUST 29, 2019 Literals are number, text, or anything that represent a value. In other words, Literals in Java are the constant values assigned to the variable. It is also called a constant. For example, int x = 100; So, 100 is literal. There are 5 types of Literals can be seen in Java. But before we start the discussion, you should revise the concept of Variables in Java . Types of Literals in Java 转存失败 重新上传 取消 1. Integral Literals in Java We can specify the integer literals in 4 different ways –