obj还是objs?

运行下面代码,得到的结果是什么?
obj还是objs?

public class Test{
       public static void test(Object obj){
              System.out.println("obj");
       }
       public static void test(Object[] objs){
              System.out.println("objs");
       }
       public static void main(String[] args){
              test(null);
       }
}

是objs哦:)

Leave a Reply

Your email address will not be published. Required fields are marked *

*