Results 1 to 5 of 5
  1. #1
    soccer_kid_6 is offline Member
    Join Date
    Feb 2010
    Posts
    35
    Rep Power
    0

    Default addition problems

    i have solved the problem thanks for the help
    Last edited by soccer_kid_6; 09-21-2010 at 06:09 PM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    Can you add some debugging code to show the values that the user entered and the values that are displayed in dialog boxes. Then run the program and copy and paste the contents of the print outs here to show completely what happens.

  3. #3
    soccer_kid_6 is offline Member
    Join Date
    Feb 2010
    Posts
    35
    Rep Power
    0

    Default

    problem solved
    Last edited by soccer_kid_6; 09-21-2010 at 06:09 PM.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    Try debugging your code by Adding print outs to show the values of all the variables you use in computing the total.
    Obviously you are NOT reseting the value of some of them. Print them out to see how/where they change. Print them with ids so you can see where they come from. Something like this:
    System.out.println("variable=" + variable); // show value of variable

  5. #5
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

    Default

    Soccer kid, it's helpful if you don't delete your posts but instead post your solution for future visitors who may have the same problem.

Similar Threads

  1. Addition of Two time
    By jithan in forum New To Java
    Replies: 5
    Last Post: 12-29-2008, 12:09 PM
  2. Addition Problem
    By tornado in forum New To Java
    Replies: 6
    Last Post: 12-07-2008, 12:37 AM
  3. string addition??
    By j2vdk in forum New To Java
    Replies: 2
    Last Post: 09-03-2008, 04:41 PM
  4. Binary Addition
    By Deo Favente in forum Advanced Java
    Replies: 11
    Last Post: 04-24-2008, 06:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •