Package study.lang.keyword

Source Code of study.lang.keyword.TestFinal

package study.lang.keyword;

import org.apache.commons.math3.random.RandomDataImpl;
import org.apache.commons.math3.random.RandomGenerator;
import org.apache.commons.math3.random.Well44497b;


public class TestFinal {
  public static void main(String[] args){
    RandomGenerator rg = new Well44497b(5);
    RandomDataImpl rng = new RandomDataImpl(rg);
    FinalClass fc = new FinalClass.Builder(rng).builder();
    System.out.println(fc.getRNG().nextInt(0, 10));
    System.out.println(fc.getRNG().nextInt(0, 10));
    System.out.println(fc.getRNG().nextInt(0, 10));
    System.out.println(fc.getRNG().nextInt(0,10));
    System.out.println(rng.nextInt(0, 10));
    System.out.println(rng.nextInt(0, 10));
//    rg = new Well44497b(11);
//    rng = new RandomDataImpl(rg);
    System.out.println(fc.getRNG().nextInt(0, 10));
    System.out.println(fc.getRNG().nextInt(0, 10));
    System.out.println(fc.getRNG().nextInt(0, 10));
    System.out.println(fc.getRNG().nextInt(0, 10));
  }
}
TOP

Related Classes of study.lang.keyword.TestFinal

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.