• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Output errors in main

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still trying to figure out line 55 and 104, but the other 2 have me just as lost, or are these reference of those 2 lines?

Big Bank: Monthly Checking Account Activity

----------- Account ----------- Beginning With- Ending Over- Credit Cd
Name Id Type Balance + Deposit - drawal - Fee = Balance draft Advance
100.0
500.0
651.0Exception in thread "main" java.lang.NumberFormatException: For input string: "Regular"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
at java.lang.Double.parseDouble(Double.java:482)
at CheckingAccountsTest.handleAccount(CheckingAccountsTest.java:104)
at CheckingAccountsTest.main(CheckingAccountsTest.java:55)

G:\COMPLE~1>

 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike,

The numbers are references to the code line numbers (not input data line numbers) in the specified class.

The program is passing the word "Regular" to Double.parseDouble() on line 104 of CheckingAccountsTest.java.

Obviously it can't get a number out of that word so it's throwing an exception.
[ November 19, 2006: Message edited by: Scott Johnson ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic