Search:

Type: Posts; User: Freaky Chris

Search: Search took 0.09 seconds.

  1. Replies
    11
    Views
    6,987

    [SOLVED] Re: Need A Little Homework Help Please

    It's because your first if also includes numbers less than or equal to 9. So they get converted into chars also.

    Chris
  2. Replies
    11
    Views
    6,987

    [SOLVED] Re: Need A Little Homework Help Please

    if (number<=9){
    System.out.println("The number you entered is "+ number +" " +
    "and the output is " + (char)(number+55));
    } that is saying if the number is less than or equal to 9 print its...
  3. Replies
    11
    Views
    6,987

    [SOLVED] Re: Need A Little Homework Help Please

    Please use code tags :)

    the cast operator works like this

    (char)(65)

    65 is the ascii value for 'A', not you cannot straight cast the number the user inputs if it is above 10, this is because...
Results 1 to 3 of 3