java 方法重载

//多个方法在同一个类中
//多个方法有相同的方法名
//多个方法参数不同、类型不同、或者数量不同

    public static int test(int a,int b){
        return 1;
    }
    public  static int test(int a){
        return 1;
    }
posted @ 2020-11-30 10:33  莫名______Q  阅读(68)  评论(0)    收藏  举报