Help importing from NetBeans?
I created this code in NetBeans for my Computer Science class, and on NetBeans, it runs. However, when I try to run the code on the code playground here, it can't find the main class. Any idea what could be wrong? https://code.sololearn.com/cp1znKt95xFK
1/11/2018 4:23:36 AMJacob Garcia
4 AnswersNew Answer
When you get the dialog, you must enter all responses required by the program. Your code is run on a remote server with no interaction with you. That one prompt is your only method of providing input. The program gets around 4 or 5 seconds of CPU maximum. If it isn't finished, it is timed out. All output is sent back to your device and displayed.
Ah, I get it. Thank you :)
Delete or comment out your package statement.
Well without the package, it starts to run, but after the first input this is what I get... Guess a number between 1 and 1000: Guess too high, try again. Guess a number between 1 and 1000: Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Unknown Source) at java.util.Scanner.next(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at GuessingGame.main(GuessingGame.java:20)