📜  重载的方法可以有不同的访问修饰符 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:16.853000             🧑  作者: Mango

代码示例2
//Overloaded method with one argument
    public void add(int input1, int input2) {
        System.out.println("In method with two argument");
    }

        //Overloaded method with one argument
    public void add(int input1) {
        System.out.println("In method with one argument");
    }