CODEARTS IDE-引入参数:重构后

时间:2024-04-16 15:05:27

重构后

class ExtractParameter {

    public static void main(String[] args) {
        sayHello();
    }

    private static void sayHello() {
        sayHello("Hello" + " " + "World!");
    }

    private static void sayHello(String message) {
        System.out.println(message);
    }
}
support.huaweicloud.com/usermanual-codeartside/codeartside_01_0127.html