| 不一样。一般不要使用this。 class Test
 {
 public static void main(String[] args)throws Exception
 {
 Thread thread=new Thread(new Runnable(){
 public void run(){
 while(true){
 System.out.println(this.getName());//编译失败。此处的this是调用run的对象的引用,该对象是实现了Runnable的一个类的一个实例。
 System.out.println(Thread.currentThread().getName());
 }
 }
 });
 }
 }
 |