Thursday, July 10, 2014

literal

  • In computer science, a literal is a notation for representing a fixed value in source code.
In contrast to literals, variables or constants are symbols that can take on one of a class of fixed values, the constant being constrained not to change.
Literals are often used to initialize variables, for example, in the following, 1 is an integer literal and the three letter string in "cat" is a string literal:
 int a = 1;
 String s = "cat";

 http://en.wikipedia.org/wiki/Literal_%28computer_programming%29

No comments:

Post a Comment