JAVA Math 类 与 Random类

package org.mathdemo;

public class MathDemo01 {
	public static void main(String args[]){
		System.out.println(Math.PI);
		System.out.println(Math.max(1, 2));
		System.out.println(Math.round(21.36));
	}
}



package org.mathdemo;

import java.util.Random;

public class RandDemo01 {
	public static void main(String args[]){
		Random rd = new Random();
		
		for (int i=0;i<100;i++){
			System.out.print(rd.nextInt(100)+"、");
		}
	}
}


你可能感兴趣的:(JAVA Math 类 与 Random类)