Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have assigned a character literal, which is delimited by single quotes, eg <code>'a'</code> (as distinct from a String literal, which is delimited by double quotes, eg <code>"a"</code>) to an <code>int</code> variable. Java does an automatic widening cast from the 16-bit unsigned <code>char</code> to the 32-bit signed <code>int</code>.</p> <p>However, when a character literal is a backslash followed by 1-3 digits, it is an <a href="http://en.wikipedia.org/wiki/Octal" rel="noreferrer"><em>octal</em></a> (<a href="http://en.wikipedia.org/wiki/Radix" rel="noreferrer">base/radix</a> 8) representation of the character. Thus:</p> <ul> <li><code>\15</code> = 1×8 + 5 = 13 (a carriage return; same as <code>'\r'</code>)</li> <li><code>\25</code> = 2×8 + 5 = 21 (a NAK char - negative acknowledgement)</li> <li><code>\100</code> = 1×64 + 0×8 + 0 = 64 (the @ symbol; same as <code>'@'</code>)</li> </ul> <p>For more info on character literals and escape sequences, see JLS sections:</p> <ul> <li><a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.4" rel="noreferrer">3.10.4: Character Literals</a></li> <li><a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.6" rel="noreferrer">3.10.6: Escape Sequences for Character and String Literals</a></li> </ul> <p>Quoting the <a href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form" rel="noreferrer">BNF</a> from 3.10.6:</p> <pre><code>OctalEscape: \ OctalDigit \ OctalDigit OctalDigit \ ZeroToThree OctalDigit OctalDigit OctalDigit: one of 0 1 2 3 4 5 6 7 ZeroToThree: one of 0 1 2 3 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload