谁能帮我解决这个问题?
public class DemoTest {
public static void main(String[] args) {
keyPressed();
}
public static void keyPressed() {
//If player presses the key 1 then print the line:
System.out.println("You pressed the key 1");
}
}
现在我想在你按下 1 键时打印出一些东西。