public static void aa(String[] args){
System.out.println("Thread.currentThread().getName() = " + Thread.currentThread().getName());
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("args.toString()1111 = " + args.toString());
}
public static void main(String[] args) {
Thread b= new Thread(new Runnable() {
@Override
public void run() {
aa(args);
}
}, "zzxx");
b.start();
Thread c= new Thread(()->{
aa(args);
}, "zzxxxx");
c.start();
}
结果:
Thread.currentThread().getName() = zzxx
Thread.currentThread().getName() = zzxxxx
args.toString()1111 = [Ljava.lang.String;@4d6c1ee7
args.toString()1111 = [Ljava.lang.String;@4d6c1ee7