Search:

Type: Posts; User: Norm

Search: Search took 0.08 seconds.

  1. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    Using any int value in the call to parseInt() will NOT fix any compiler errors.
    An error due to an invalid radix would happen when the program was executed, not when it was compiled.

    10 is the...
  2. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    What about the examples that used: 10 or 2 or 16?
    You are probably used to using radix 10: 10 digits 0 to 9. 2 is for binary and 16 for hexidecimal.
  3. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    Please copy full text of the compiler's error message and paste it here. Here is a sample:


    TestSorts.java:138: cannot find symbol
    symbol : variable var
    location: class TestSorts
    var...
  4. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    Can you copy the full text of the compiler's error messages?

    Your IDE's message does NOT say what the problem is. The error message needs to say what the problem is.

    Do you know what a radix...
  5. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    What does the compiler say with that statement when you compile it?

    Copy the full text of any error messages here.

    If it compiles with no errors, What happens when you execute it? Does it work?...
  6. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    Take a look at how your code uses the nextInt() method that I posted in post#10.
    That method returns a value that is assigned to a variable. You need to do the same thing when you call the...
  7. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    Where does the code save the value returned by the parseInt() method?

    Look at the definition:

    public static int parseInt(String s)
    See the "int" part? That says the method returns an int....
  8. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    The link: Java Platform SE 7

    Find the link to the class in the lower left section, click it and the doc is shown in the main window.
  9. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    Did you read the API doc for the parseInt() method? It shows you how to use the method.
    If you have questions about the API doc for parseInt() copy the doc here and ask your questions.
    You need to...
  10. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    The error message says what the problem is. The parseInt() method does NOT take a JTextField object for a parameter. Look at the API doc for the method to see what kind of arg it takes.
  11. Replies
    26
    Views
    2,493

    Re: Need to input algorithems with String values.

    Please post the full text of the error messages and the code that caused it.


    The Integer class's parseInt() will do that.
Results 1 to 11 of 11