在尝试运行我的基本java代码时,我一直收到此错误。它编译时没有任何错误,但由于某种原因,程序实际上不会运行。我正在使用textpad。这是我的代码。
/*
*TrudiHw.java
*Trudi Farrell
*19/10/15
*/
import java.util.Scanner;
public class TrudiHw{
public static void main (String args[]){
int input;
int answer;
Scanner keyboard;
keyboard = new Scanner(System.in);
System.out.println("How many students are attendting the trip?");
input = keyboard.nextInt();
answer = input/5;
System.out.println("The amount of cars you will need is " +answer);
}
}