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...
Type: Posts; User: Norm
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...
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.
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...
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...
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?...
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...
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....
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.
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...
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.
Please post the full text of the error messages and the code that caused it.
The Integer class's parseInt() will do that.