Two Main methods with different signatures

后端 未结 10 1445
旧时难觅i
旧时难觅i 2021-01-18 17:53

I have following class.

public class Test {

    public static void main(Integer[] args) {
        System.out.println(\"This is not a main\"); 
    }   

           


        
10条回答
  •  [愿得一人]
    2021-01-18 17:58

    Aside from what others have mentioned, you can use var-args to implement String array.

    public static void main (String ...a)
    

提交回复
热议问题