skip to main | skip to sidebar

Technical Notes

Friday, February 19, 2010

Interesting Java tidbit

If you pass a number in String form, padded with spaces, like " 89.99 " for example, to Double.parseDouble(), no exceptions will be thrown. If you pass the same number to Integer.parseInt(), a NumberFormatException will be thrown.
Posted by boristech at 11:22 AM No comments:
Labels: java parse numbers
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2011 (8)
    • ►  October (1)
    • ►  September (3)
    • ►  June (1)
    • ►  April (1)
    • ►  January (2)
  • ▼  2010 (8)
    • ►  December (1)
    • ►  August (1)
    • ►  July (1)
    • ►  May (1)
    • ▼  February (1)
      • Interesting Java tidbit
    • ►  January (3)
  • ►  2009 (17)
    • ►  December (5)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  July (1)
    • ►  June (3)
    • ►  April (3)
    • ►  March (1)
    • ►  February (1)
  • ►  2008 (6)
    • ►  October (1)
    • ►  September (1)
    • ►  August (1)
    • ►  July (2)
    • ►  April (1)

About Me

boristech
View my complete profile