NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Hi there In the context of SM6 I've found the following question http://www.javablackbelt.com/QuestionDetail.wwa?qidk=11714 (although it doesn't fit to SM6 criteria ) ).
I beleive that the question has WRONG answer. I've tested the code from the question on 2 different PCs, and the result wasn't the same as in the question. I had created new proposition there, but Pravin Jain has rejected it.
Can someone be a referee?
Thanks.
p.s. You can find my proposition as revision #3 (rejected)
You are right, Evgeniy. First, the explanation of the question is not consistent with the answer, choice 4 should be the correct one according to Pravins explanation. Second, Java makes no guarantees at all about scheduling or that a thread is started at all. Most JVMs would behave in a way so that the output of choice 4 is printed to the console. So your version of the question including your explanation is correct.
Thanks guys I see I'm not wrong (a lot of comments in the question also proves it).
And the next question: how can we convince Pravin of the thruth of our words?
I think administrators should help us there, shouldn't they?
I've moved the question to the freezer until this is resolved. I agree with the posts in this thread that the answer cannot be determined. I've added a comment to the author to discuss here.
Your update misses the point. There's no guarantee that a thread is started when you call start(). A VM can do anything as long as it does not break the rules described in chapter 17 of JLS third edition. The scheduler may choose to delay the execution of thread1 for x seconds for whatever reason. It doesn't matter if there are processes hogging one or more CPUs. The point is that a specific behaviour is not guaranteed. BTW, your question still marks choice 2 as the correct one. Please try your code and I bet you will get the output of choice 4. But this doesn't really matter since even choice 4 is not guaranteed the result is unpredictable.
A referee in concurrent question is wanted :)
At 3:39 AM on May 17, 2007, Evgeniy Platonov wrote:
Fresh Jobs for Developers Post a job opportunity
In the context of SM6 I've found the following question http://www.javablackbelt.com/QuestionDetail.wwa?qidk=11714 (although it doesn't fit to SM6 criteria ) ).
I beleive that the question has WRONG answer. I've tested the code from the question on 2 different PCs, and the result wasn't the same as in the question. I had created new proposition there, but Pravin Jain has rejected it.
Can someone be a referee?
Thanks.
p.s. You can find my proposition as revision #3 (rejected)
7 replies so far (
Post your own)
Re: A referee in concurrent question is wanted :)
I agrre with you Evgeniy. I posted similar comment to this questions some time ago. It also was rejected.Re: A referee in concurrent question is wanted :)
Hmm I think option #4 is more likely to be the answer. And I suppose the explanation also says that the answer is option #4 too.Re: A referee in concurrent question is wanted :)
You are right, Evgeniy. First, the explanation of the question is not consistent with the answer, choice 4 should be the correct one according to Pravins explanation. Second, Java makes no guarantees at all about scheduling or that a thread is started at all. Most JVMs would behave in a way so that the output of choice 4 is printed to the console. So your version of the question including your explanation is correct.Re: A referee in concurrent question is wanted :)
Thanks guysAnd the next question: how can we convince Pravin of the thruth of our words?
I think administrators should help us there, shouldn't they?
Re: A referee in concurrent question is wanted :)
I've moved the question to the freezer until this is resolved. I agree with the posts in this thread that the answer cannot be determined. I've added a comment to the author to discuss here.Re: A referee in concurrent question is wanted :)
I have updated the question.pl. check the changed version.
Re: A referee in concurrent question is wanted :)
Your update misses the point. There's no guarantee that a thread is started when you call start(). A VM can do anything as long as it does not break the rules described in chapter 17 of JLS third edition. The scheduler may choose to delay the execution of thread1 for x seconds for whatever reason. It doesn't matter if there are processes hogging one or more CPUs. The point is that a specific behaviour is not guaranteed. BTW, your question still marks choice 2 as the correct one. Please try your code and I bet you will get the output of choice 4. But this doesn't really matter since even choice 4 is not guaranteed the result is unpredictable.