We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComplexCurrentThreadTest测试结果与ReadMe里的说明结果不符合
begin========= Thread.currentThread().getName=main this.getName()=Thread-0 end=========== run begin======= Thread.currentThread().getName=Thread-1 this.getName()=byhieg run end========== 这是我在eclipse里的执行结果,在执行run的时候Thread.currentThread().getName的结果是Thread-1而不是上面设置的byhieg
The text was updated successfully, but these errors were encountered:
你没看清ReadMe里的测试用例,和代码里的是不一样的。代码里为了说明this.getName()和Thread.currentThread().getName()的不同,特地又new了一个Thread。 setName()之后Thread.currentThread().getName得到的是新new的线程名Thread-1,因为是Thread-1执行start,运行了run方法,所以结果不是设置的byhieg
Sorry, something went wrong.
No branches or pull requests
ComplexCurrentThreadTest测试结果与ReadMe里的说明结果不符合
begin=========
Thread.currentThread().getName=main
this.getName()=Thread-0
end===========
run begin=======
Thread.currentThread().getName=Thread-1
this.getName()=byhieg
run end==========
这是我在eclipse里的执行结果,在执行run的时候Thread.currentThread().getName的结果是Thread-1而不是上面设置的byhieg
The text was updated successfully, but these errors were encountered: