Package thread.concurrencyCookbook.chapter1.recipe1.core

Source Code of thread.concurrencyCookbook.chapter1.recipe1.core.Main

package thread.concurrencyCookbook.chapter1.recipe1.core;

import thread.concurrencyCookbook.chapter1.recipe1.task.Calculator;

/**
*  PeriodictskExecution class of the example
*/
public class Main {

  /**
   * PeriodictskExecution method of the example
   * @param args
   */
  public static void main(String[] args) {

    //Launch 10 threads that make the operation with a different number
    for (int i=1; i<=10; i++){
      Calculator calculator=new Calculator(i);
      Thread thread=new Thread(calculator);
      thread.start();
    }
  }
}
TOP

Related Classes of thread.concurrencyCookbook.chapter1.recipe1.core.Main

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.