FileDocCategorySizeDatePackage
StringCounterR.javaAPI DocExample581Mon Mar 02 22:04:22 GMT 1998None

StringCounterR

public class StringCounterR extends Object implements Runnable

Fields Summary
Thread
t
private String
str
Constructors Summary
public StringCounterR(String s)

  str = s;
      t = new Thread( this );
      t.start();
   
Methods Summary
public static voidmain(java.lang.String[] args)

  new StringCounterR( "Fred" );
      new StringCounterR( "Alice" );
   
public voidrun()

  for( int i = 1; i <= 5; i++ )
      {  System.out.println( "" + i + "\t" + str );
         t.yield();
      }