Topic: 在学习线程时,遇到一个问题,请高手帮忙

  Print this page

1.在学习线程时,遇到一个问题,请高手帮忙 Copy to clipboard
Posted by: wqq_721
Posted on: 2008-09-01 17:23

在学习线程时,遇到一个问题:
为什么注释处写在上面和删除掉会影响程序显示结果?请高手帮助回答下,先谢了。
代码如下:
class ThreadLife
{
public static void main(String [] args)
{
ThreadTest tt=new ThreadTest();
new Thread(tt).start();
for (int i=1;i<=50;i++)
{
if(i==25)
{
tt.b=false;
}
system.out.println("main Thread");//此处为什么会影响编程结果
}
}
}

class ThreadTest implements Runnable
{
boolean b=true;
public void run()
{

while Beer
{
System.out.println(Thread.currentThread().getName());
}
}
}

2.Re:在学习线程时,遇到一个问题,请高手帮忙 [Re: wqq_721] Copy to clipboard
Posted by: wqq_721
Posted on: 2008-09-01 17:25

表情是处代码是: (b)

3.Re:在学习线程时,遇到一个问题,请高手帮忙 [Re: wqq_721] Copy to clipboard
Posted by: wqq_721
Posted on: 2008-09-02 10:22

这个论坛令我很失望,这么长时间也没热心人帮忙,还是http://www.csdn.net/好,
同一个问题我在两个地方发贴,csdn社区的就有好多热心人帮忙,
原本还是比较喜欢cjsdn的社区风格的,现在想想自己认为的好看但不好用,有什么用,
不信就去看一看,http://topic.csdn.net/u/20080901/16/58fbd98b-9ff9-4d8a-b9de-c5874a468ab4.html?seed=2116203325

4.Re:在学习线程时,遇到一个问题,请高手帮忙 [Re: wqq_721] Copy to clipboard
Posted by: JiafanZhou
Posted on: 2008-09-03 16:58

I am glad that your problem got solved. People in this forum scarifies their own time to help others tackling their software issues, you need to have some patience when posting a new questions. Never push others to answer you question in a short period of time.

I do agree that csdn has more people to answer easy questions in relation to Java, and possibly they do give better explanations than us. But there are couple of seasoned software engineers in this forum whom we should respect. They can give your invaluable advice and suggestion from where csdn cannot.

So maybe you should treat this place as an elite and advanced Java programming forum.

my 2 cents,
Jiafan

5.Re:在学习线程时,遇到一个问题,请高手帮忙 [Re: wqq_721] Copy to clipboard
Posted by: wqq_721
Posted on: 2008-09-04 09:58

版主,也许你说的对,每个论坛都有他独特的一面,对上面就的话我向你道歉,一时冲动吧,也只是想论坛能够更加的活跃一些一起,凝聚更多的人气(因为我是先知道现在这个论坛的,在上面也学到了很多东西,也看到过各版主好多经典的回复),但我看了一下各贴最后回复的时间,更新回贴都很少,只是不想看到论坛恶性循环,渐渐被冷淡。。。

6.Re:在学习线程时,遇到一个问题,请高手帮忙 [Re: wqq_721] Copy to clipboard
Posted by: JiafanZhou
Posted on: 2008-09-04 16:46

Not everybody has time to play "Ghost buster", (see AVGN videos about the ghost buster... very funny... ass...).

Same principle applied here, I understand not everybody has free time to come to this forum here to share their knowledge. I hope more and more people (no matter software developers or students or others) can share their knowledge here with others, that includes you, wqq_721.

Any people can share their knowledge with other people, sometimes these information helps a lot. Personally, I benefit a lot from other people in this forum here. So do not always "take", we should "give" instead if required. It is all about contributions to software industry in China.

What do you recommend? Smile

Thanks,
Jiafan

7.Re:在学习线程时,遇到一个问题,请高手帮忙 [Re: wqq_721] Copy to clipboard
Posted by: 爱算鸡毛
Posted on: 2008-09-05 00:25

楼上 你说啥?

8.Re:在学习线程时,遇到一个问题,请高手帮忙 [Re: 爱算鸡毛] Copy to clipboard
Posted by: JiafanZhou
Posted on: 2008-09-06 17:37

爱算鸡毛 wrote:
楼上 你说啥?

I think English is a must skill as a software engineer. Some people may disagree with me on this, but I want to approve them that they are wrong.

- If you are working in a foreign IT company, then you need to speak and write in English on a daily basis.
- If you work as a freelancer and you need to deal with other customers abroad in English.
- When working in a Chinese Software Industry, maybe you think English is not as important as other places because we communicate and write Functional Specification and other documents in Chinese. Well, this might be ok for a while until some day you realise that the company has to handle foreign customers.
- My opinion on one of the reason why Chinese software industry lags far behind other countries is because people don't realise how important English is.
- Even lots of Software originally written in English now realise the importance of localisation. e.g. msn messenger has its Chinese version. (think about the reason behind this)

Ok, I have to say this is a bit tangent from the original topic. I want to stop here even I have a lot other points in my mind I want to share with you.

Hope this helps
Jiafan

9.Re:在学习线程时,遇到一个问题,请高手帮忙 [Re: JiafanZhou] Copy to clipboard
Posted by: wqq_721
Posted on: 2008-09-09 09:22

[quote][b]JiafanZhou wrote:[/b]
。。。
So do not always "take", we should "give" instead if required.
。。。
[/quote]
人要乐于助人嘛,呵

在这个社会,对于软件这个行业,英语越来越重要,可我的很 烂,很羡慕版主有这么好的英语水平,向“JiafanZhou” 版主好好学习,DAY DAY UP!


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923