Posted by: zeePa May 31, 2009
java help in threading please
Login in to Rate this Post:     0       ?        

Create a class named RaceHorse that extends Thread.  Each RaceHorse has a
name and a run() method that displays the name 50 times.  Write an application
that instantiates 5 RaceHorse objects each with different names, executing in
their own Thread.  The last RaceHorse to finish is the loser.


 


class RaceHorse extends Thread {


private String horseName;


private static String loser = null;


private int rep = 50;


public RaceHorse(String horse)


This is the farthest i have gone and i don't know how else to approach this
...trying to get help from some tutorials but to no availl..


 


Dorje

Read Full Discussion Thread for this article