Suppose I have something like
int x = 2 + 3;
Is it xconsidered a literal?
x
x- symbol. 2 + 3- expression. 2and 3are literals.
2 + 3
2
3
No, these are two literals in a compile-time constant expression. Depending on how it compiles, you may not be able to distinguish the resulting binary.
, , i.g.
http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html
http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.html
, . , ,
, ( , , ):
const unsigned int NEGATIVE_TESTER_FOR_32_BIT = 1 < < 31;
const char ALPHABET_PIVOT = 'A' + (('Z' - 'A')/2);
[EDIT: ] , . , , , - . "H", , verbatim "H" , (72 0x48 48h ) . , , . (-)
Source: https://habr.com/ru/post/1744733/More articles:How to get the file size of a large (> 4 GB) file? - cwhat buffer size is best for uploading a file to the Internet - httpdo not display notification after seeing that once - androidMvcContrib CheckBoxList - mvccontribjquery every () does not work in Internet Explorer - javascriptHow to check record existence and insert in MYSQL? - mysqlHow do I avoid running out of memory for graphics for an Android app? - androidHow to check SSIS packages? - unit-testingHow to enable a library in symfony - phpHow to make Shell always be on top in SWT? - javaAll Articles