点击运行
public class Main { static void myMethod() { System.out.println("I just got executed!"); } public static void main(String[] args) { myMethod(); myMethod(); myMethod(); } }
运行结果 :
正在执行...