1

I am not quite sure what i am doing wrong with this code.

I am trying to import the joptionpane and then convert the string into an int my error comes at

**start = inputValue.Integer.parseInt();**
 JOptionPane pane = new JOptionPane();

String inputValue = JOptionPane.showInputDialog("Please input a value"); 
start = inputValue.Integer.parseInt();

2 Answers 2

2

Try this:

start = Integer.parseInt(inputValue);

Sign up to request clarification or add additional context in comments.

Comments

1

I think you meant start = Integer.parseInt(inputValue);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.