Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Re: Starting Out With Java Programming Challenge Chapter 10 #11

    That would do it.
  2. Re: Starting Out With Java Programming Challenge Chapter 10 #11

    What is printed by the code in post#12? Are there items on a line that are not printed?
    Add a println() to print the contents of the variable: line so you can see the full text of the line as well...
  3. Re: Starting Out With Java Programming Challenge Chapter 10 #11

    The problem with that code is that the token is only printed and then not used for the total.
    The code needs to:
    assign the token to a String,
    print the String
    parse the String to a double...
  4. Re: Starting Out With Java Programming Challenge Chapter 10 #11

    Where is the debug println()s output that shows what values were read and used in computing the total?
  5. Re: Starting Out With Java Programming Challenge Chapter 10 #11

    Please explain. Post the current output and the expected output.

    Try debugging the code by adding println() statements that print out the tokens that are returned by nextToken() so you can see...
  6. Re: Starting Out With Java Programming Challenge Chapter 10 #11

    The contents of the variable: str is NOT parseable to a double. str contains many values each of which can be parsed.
    The StringTokenizer class separates out the parts of str that can be parsed. ...
  7. Re: Starting Out With Java Programming Challenge Chapter 10 #11

    The code at line 109 used an invalid String in the call to the parseDouble() method. Check the code to see what String should be used.
Results 1 to 7 of 7