All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.pdx.cs.joy.net.CountingRace Maven / Gradle / Ivy

The newest version!
package edu.pdx.cs.joy.net;

/**
 * This class demonstrates concurrency in Java by having Big Bird and
 * Mr. Snuffleupagus race to see who can count to 10 first.
 */
public class CountingRace {

  /**
   * Create a Big Bird and Snuffy and have them race.
   */
  public static void main(String[] args) {
    Counter bigBird = new Counter("BigBird");
    Counter snuffy = new Counter("Snuffy");

    bigBird.start();
    snuffy.start();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy