What are the Java semantics of an escaped number in a character literal, e.g. '\\15' ?
Please explain what, exactly, happens when the following sections of code are executed: int a='\15'; System.out.println(a); this prints out 13; int a='\25'; System.out.println(a); this prints out 21; int a='\100'; System.out.println(a); this prints out 64. Bohemian You have assigned a character literal, which is delimited by single quotes, eg 'a' (as distinct from a String literal, which is delimited by double quotes, eg "a" ) to an int variable. Java does an automatic widening cast from the 16-bit unsigned char to the 32-bit signed int . However, when a character literal is a backslash