Search:

Type: Posts; User: JavaPF

Search: Search took 0.09 seconds.

  1. Replies
    9
    Views
    2,440

    [SOLVED] Re: Converting to and comparing integers.

    I was just attempting to fix your original code but I have no idea how to get System.in.read() to output an inputted integer value. ~X( I have tried all kinds of conversions but for some reason it's...
  2. Replies
    9
    Views
    2,440

    [SOLVED] Re: Converting to and comparing integers.

    Yes I understand now. I have just done some reading on System.in.read(). I can't remember the last time I used this on it's own.

    Learning Java - Chapter 9 : Java

    This is why I use the Scanner...
  3. Replies
    9
    Views
    2,440

    [SOLVED] Re: Converting to and comparing integers.

    Hmm this is strange. I compiled the code you submitted above and changed the char variables to int. The problem is, when using System.in.read(); for some reason, if Choice is set to integer, it...
  4. Replies
    9
    Views
    2,440

    [SOLVED] Re: Converting to and comparing integers.

    Hello luke, no problem.

    Here is the Scanner class API

    Scanner (Java 2 Platform SE 5.0)

    Do you need to complete this without the use of the Scanner class or is my example OK?
  5. Replies
    9
    Views
    2,440

    [SOLVED] Re: Converting to and comparing integers.

    Hello luke.

    Welcome to the Java Programming Forums :D

    There are a few things wrong with your code.

    For a start, you have declared the wrong variable type. If you are working with numbers...
Results 1 to 5 of 5