Menu
Topics Index
...
`


Datatypes > Primtive Dataypes > Literals >
Siva Nookala - 11 Apr 2016
A constant value in a program is denoted as literal. e.g., 10, 534, 29.5, 'c', true, false, 'E', '&' are all literals of various datatypes.

int num = 10;
In the above statement 10 is an integer literal. Because the value 10 directly represents the integer so, 10 is called integer literal. In Java, these are the various types of literals:

0
Wrong
Score more than 2 points

© meritcampus 2016 - 2017

All Rights Reserved.