package luento12; import java.util.Random; /** * Näyttää miten arvotaan lukuja. * * @author vesal * @version 12.10.2010 * */ public class Arvo { /** * @param args */ public static void main(String[] args) { double luku; luku = Math.random(); System.out.println(luku); Random rand = new Random(); rand.setSeed(4); // randomize() for (int i=0; i<10; i++) { int n = rand.nextInt(39); System.out.print(" "+n); } System.out.println(); } }