I have tried my program for this question but I am not getting my desired output, I need 100 A's ,100 B's and 100 C's ..
I am getting the output but the thing is the output is not ordered like AAABBBBBBBBBCCCCCC etc like this.
Karthikeyan Pandian wrote:This is my question , its actually an scjp book exercise.
Karthikeyan Pandian wrote:No heena, I am using syncrhronized keyword to produce the output in order.
This question is taken from SCJp 6.0 by Kathy Sierra
From the chapter Threads in sub topic Synchronization and Locks.
Karthikeyan Pandian wrote:@HEENA
Is the question also doesnt mean that the output should be in order right??
Because I again gone through the question deeply , its just mentioned that the output should produce 10 counts of A , B and C.
AM i right??
Karthikeyan Pandian wrote:@Heena
I got solutions to both the questions.
Karthikeyan Pandian wrote:
But i cant guess the third one.
Karthikeyan Pandian wrote:
Anyways thanks for clearing my doubt . I got some clarity in my topic.
Hey! You're stepping on my hand! Help me tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|