34 lines
		
	
	
		
			606 B
		
	
	
	
		
			Java
		
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			606 B
		
	
	
	
		
			Java
		
	
	
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());
 | 
						||
    }
 | 
						||
 | 
						||
 | 
						||
}
 |