Page 2 of 2 FirstFirst 12
Results 21 to 29 of 29
  1. #21
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    {catch(Exception e){System.out.println("error is: "+e);}
    Now I pointed as bold ";" Add ";" as I say and try again

  2. #22
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    else{

    System.out.println(a +","+ b +","+ c +","+"The input not valid.");
    }
    AS a rule the code should be placed in the final end of the if statement :)

  3. #23
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    But you have it in the middle

  4. #24
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Your statement declaration is wrong.

    Java Code:
    System.out.println("error is: "+e)
    Should be like this

    Java Code:
    System.out.println("error is: "+e);

  5. #25
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    if ((a + b > c) && (a + c > b) && (b + c > a)){
    why don't you use || instead of && I think it may be a logical error because I think that ((a + b > c) cannot be at the sane time (a + c > b) and at the same time (b + c > a)
    Last edited by Webuser; 01-19-2009 at 08:08 AM.

  6. #26
    Join Date
    Jan 2009
    Posts
    90
    Rep Power
    0

    Default

    that is not the problem that part works
    my problem is the accending part which is the last part of the program

  7. #27
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    Quote Originally Posted by PureAwesomeness View Post
    that is not the problem that part works
    my problem is the accending part which is the last part of the program
    that you may think :)

  8. #28
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    if you don't know where to put ";" how can you really know that the problem is in the last part of the program

  9. #29
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    put the statement
    else{

    System.out.println(a +","+ b +","+ c +","+"The input not valid.");
    }
    in the end of all
    if statements
    you have in the code. I mean it for else is usually a final statement of any if array

Page 2 of 2 FirstFirst 12

Similar Threads

  1. What did i do wrong
    By jpnym15 in forum New To Java
    Replies: 8
    Last Post: 11-17-2008, 10:07 AM
  2. what's wrong in here!!!
    By Annatar in forum New To Java
    Replies: 8
    Last Post: 11-14-2008, 02:55 AM
  3. So, what am I doing wrong?
    By Charles_Smith in forum New To Java
    Replies: 0
    Last Post: 10-29-2008, 02:50 PM
  4. right or wrong
    By jot321 in forum New To Java
    Replies: 7
    Last Post: 09-25-2008, 11:45 AM
  5. Replies: 21
    Last Post: 08-01-2008, 11:13 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
  •