Demo entry 5856033

java

   

Submitted by anonymous on Jul 21, 2016 at 11:00
Language: Java. Code size: 407 Bytes.

package tomgg.util.random;

import java.util.Random;

public class RandowGen {
	public static Random random = new Random(10);
	public static Random random2 = new Random(10);

	public static void main(String[] args) {
		for (int i = 0; i < 10; i++) {
			System.out.println("random  第"+(i+1)+"次结果:"+random.nextInt());
			System.out.println("random2 第"+(i+1)+"次结果:"+random2.nextInt());
		}
	}

}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).