我的代码无法在NetBeans上运行。
包裹火车站:
public class TrainStation
{
static int WAITING_ROOM_CAPACITY = 30;
private static Passenger[] waitingRoom = new Passenger [WAITING_ROOM_CAPACITY];
private static PassengerQueue trainQueue = new PassengerQueue();
public static void main(String[] args)
{
//menu
//repeat the options until the user presses 'q'
//option A, V, D, S, L, R
Passenger pass1 = new Passenger("Talia","Piscitelli");
trainQueue.add(pass1);
trainQueue.display();
}
private static void displayMenu()
{
}
private static void addPassengerToTrainQueue()
{
}
private static void removePassengerFromTrainQueue()
{
}
}
每当我尝试运行代码时,都会出现此错误:
Error: Could not find or load main class trainstation.TrainStation
/Users/t/Library/Caches/NetBeans/8.2/executor-snippets/run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)
有人可以帮助我解决此问题吗? 我为旅客和旅客队列创建了单独的类。