lptwms/conf/hhwms/MyTest.java

34 lines
606 B
Java
Raw Permalink Normal View History

2024-08-03 17:52:03 +08:00
package hhwms;
import java.util.Date;
public class MyTest {
public static void main(String[] args) throws Exception {
String result = method();
}
public static String method(){
method2();
System.out.println("main方法调用method得到了结果"+new Date().toLocaleString());
return "SUCCESS";
}
private static void method2() {
System.out.println("新线程执行method2已经有10s了"+new Date().toLocaleString());
}
}