So i was practesing with Scanner and delay...
This happened and i dont know whats wrong?
It has something to do with delay but i cant figure it out?
import java.util.Scanner; public class ReactionGame { public static void main(String[] args) { Scanner NewScanner = new Scanner(System.in); System.out.println("Type K and press enter when STOP appears"); Delay(1000); System.out.println("STOP"); String s = NewScanner.nextLine(); System.out.println("You can do better!"); } }
I dont know why the "Delay(1000)" doesnt work?!?!?
heres the error response.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method Delay(int) is undefined for the type ReactionGame
at ReactionGame.main(ReactionGame.java:8)
Hope someone can figure this "Easy" Thing out!
Have fun coding!
Greetings,
Niels