日期:2014-05-20 浏览次数:20694 次
public class Test{
public static void main(String args[]) {
LogOaRentThread2 lt = new LogOaRentThread2();
lt.start();
String ss = "auto mapping";
final String s = ss;
new Thread(){
public void run(){
System.out.println("start");
doMapping(s);
System.out.println("end");
}
}.start();
System.out.println(getBoolean());
}
public static boolean getBoolean(){
return false;
}
public static synchronized void doMapping(String ss){
System.out.println(ss);
}
static class LogOaRentThread2 extends Thread{
public void run (){
System.out.println("LogOaRentThread2 start");
System.out.println("do something");
System.out.println("LogOaRentThread2 end");
}
}
}