document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. float pi1 = 3_.1415F;      // Invalid; cannot put underscores adjacent to a decimal point
  2. float pi2 = 3._1415F;      // Invalid; cannot put underscores adjacent to a decimal point
  3. long socialSecurityNumber1
  4.   = 999_99_9999_L;         // Invalid; cannot put underscores prior to an L suffix
  5.  
  6. int x1 = _52;              // This is an identifier, not a numeric literal
  7. int x2 = 5_2;              // OK (decimal literal)
  8. int x3 = 52_;              // Invalid; cannot put underscores at the end of a literal
  9. int x4 = 5_______2;        // OK (decimal literal)
  10.  
  11. int x5 = 0_x52;            // Invalid; cannot put underscores in the 0x radix prefix
  12. int x6 = 0x_52;            // Invalid; cannot put underscores at the beginning of a number
  13. int x7 = 0x5_2;            // OK (hexadecimal literal)
  14. int x8 = 0x52_;            // Invalid; cannot put underscores at the end of a number
  15.  
  16. int x9 = 0_52;             // OK (octal literal)
  17. int x10 = 05_2;            // OK (octal literal)
  18. int x11 = 052_;            // Invalid; cannot put underscores at the end of a number
');