任何人都可以帮助我解决构建错误问题,我的代码无法在NetBeans上运行吗?

时间:2020-03-26 16:16:18

标签: java netbeans build-error

我的代码无法在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)

有人可以帮助我解决此问题吗? 我为旅客和旅客队列创建了单独的类。

0 个答案:

没有答案