📜  如何在java代码示例中调用函数

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

代码示例1
public class MyClass {
 
    static void myMethod() {
        System.out.println("You have called me! My name is: myMethod!");
    }
 
    public static void main(String[] args) {
        myMethod();
    }
}