Java:无法加载或查找主类TrudiHw

时间:2015-10-22 00:31:25

标签: java textpad

在尝试运行我的基本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);

    }
}

0 个答案:

没有答案