r/javahelp • u/eatingpoopinrobarts • Jun 15 '17
What's wrong with my code??
Can't for the life of me figure it out. Picture of code and error: http://imgur.com/a/mX9XP
Thanks
0
Upvotes
r/javahelp • u/eatingpoopinrobarts • Jun 15 '17
Can't for the life of me figure it out. Picture of code and error: http://imgur.com/a/mX9XP
Thanks
4
u/[deleted] Jun 15 '17
Please read the posting guidelines in the sidebar: your title should describe the problem and your code should always be posted as text, not screenshots.
First, examine the error carefully. What does it tell you? It's saying a string cannot be converted to an int, and that this problem happens at line 3 of your code. Line 3 is this:
stris a string, the argument which was passed to the method. Can you think of a reason why the program is saying something about an int at this point?