Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

To Thread  RSS feed

 
bapi dhar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friend
help me with the code.

The program outputs different colored stars. I want the two
thread to print in their own designated color.i want to remove
the random part and wish to have the same output.
thanks
bapi


Please use [ code] [ /code] tags to format your code. Check out the UBB Code link below for further details


Thanks
Rahul P Mahindrakar


[This message has been edited by Rahul Mahindrakar (edited March 13, 2001).]
 
Rahul Rathore
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can re-use the same switch statement as follows:-

and modify the switch block as follows:-
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!