2011-11-01

What is a Literal ?

Literal is a nothing but a constant. Literals represent numerical (integer or floating-point or double), character, boolean or string values. For example 10, 20.4, 'a', "a", "ab", true, false. Let us take a statement

int month=10;
In the above statement the literal is an integer value i.e 10. The literal is 10 because it directly represents the integer value.


Comment for any doubts.......

Loading

Enter your Email here: