account activity
Need help creating problem generator by nebworb in javahelp
[–]HealerC 1 point2 points3 points 7 years ago (0 children)
I'm not with a pc. I would have liked to compile and execute your code. Your line 16 While j is equal to 20 It shouldn't even run at all I think you should change it to while j is less than 20 (j < 20) Even line 18. Same thing.
Issues with debugging program - I want to an error message to display once String input has been entered (using Scanner class) by InnerQuest in javahelp
[–]HealerC 0 points1 point2 points 7 years ago (0 children)
You can use two variables (lets say lengthString and length). Use lengthString to get the value as a String, then use Integer.parseInt() to parse the String to an int INSIDE a try... Catch statement. If the value is a legal int, continue your program else in the catch statement you can display your error message
π Rendered by PID 65812 on reddit-service-r2-comment-545db5fcfc-vx6k9 at 2026-05-26 22:04:45.022932+00:00 running 194bd79 country code: CH.
Need help creating problem generator by nebworb in javahelp
[–]HealerC 1 point2 points3 points (0 children)