Error in Eclipse - Mainclass not found

后端 未结 5 1910
醉酒成梦
醉酒成梦 2021-01-24 10:01

I\'m new in programing and I like it pretty much. I\'ve just downloaded Eclipse and I got an error I can\'t help me with. Unfortunately it\'s in German but the meaning is someth

5条回答
  •  别那么骄傲
    2021-01-24 10:36

    We can't run a Java program without

    public static void main(String[] args) {
    }
    

    The program only executs the main method. In the main method you can create objects like

    Elevator elevator = new Elevator();
    

    You can put the main method anywhere.

提交回复
热议问题