Java can't find method main

后端 未结 7 1999
孤街浪徒
孤街浪徒 2021-01-20 10:45

Im having trouble with a simple hello world program lol! Im hoping someone can shed some light on this.

So the error im receiving is the following:

$         


        
相关标签:
7条回答
  • 2021-01-20 11:42

    problem is with main signature, which should be

    public static void main(String[] argv)
    

    or could be

    public static void main(String ... argv) // known as varargs
    

    instead of public static void main(String argv) which is in your case

    have a look at this

    for varargs look

    0 讨论(0)
提交回复
热议问题