Static Error: This class does not have a static void main method accepting String[]

后端 未结 3 1440
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 07:29

I\'m learning, I\'m newbie but I wanted to know what I do to get \"run\" it. this happening a error:

Static Error: This class does not have a static void mai         


        
3条回答
  •  北海茫月
    2020-12-12 08:06

    If you write a java program, it can have a number of classes but for all the classes to run we should have a main class which is used to implement the classes which we defined. You created a class without main in it. The program will start its execution from main.

提交回复
热议问题