Your First Java Program Solutions

From CompSciWiki
Revision as of 11:43, 20 March 2007 by Umhieb34 (Talk | contribs)

Jump to: navigation, search
  1. ...
  2. ...
  3. Escape sequences exist because the characters they represent either cannot be typed on the keyboard, or have no single-character representation.
    1. 50
    2. 25L (casting does not round, it merely drops the decimal portion)
    3. 55000000000000000L
    4. Error, 1.23e240 is outside the range of float types.
    5. Error, 2500000000L is outside the range of int types
    6. 6.789E7
    7. 600.0
  4. Recall that escape characters such as \\ and \n may look longer than they really are. They are interpreted by the computer as single characters.
      1. 19
      2. 16
      3. 10
  5. ...
  6. ...