SCJP 6
Ankur kothari wrote:still no idea.....the name is printed only when the nameTest method completes.....in the first case a new thread runs simultaneously with the main thread.....same happens in the second case.....how does the output change by just adding one more line below start();
SCJP 6
S Ali wrote:I'll take a wild guess . Cause it has to wait for start to begin running in order to print Ankur (before method returns). But I don't get it I mean no guarantees, right?
SCJP 1.6 96%
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Ankur
good
Ankur
good 0 1 2 3
Ankur
good
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Neha Daga wrote:in this question there is no option saying "result is not predictable", and "good" is the only answer that may be a possible output so in this case I think 1 is correct answer.
Ankur
good
Ankur
good 0 1 2 3
Ankur
good
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |