package javaapplication1;
/**
*
* @author Administrator
*/
public class JavaApplication1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int a=16;
System.out.println("16的平方为:"+Math.sqrt(a));
System.out.println("2^3="+Math.pow(2, 3));
System.out.println("-4的绝对值="+Math.abs(-4));
System.out.println("100的对数="+Math.log10(100));
}
}
结果是:
run: 16的平方为:4.0 2^3=8.0 -4的绝对值=4 100的对数=2.0 成功构建 (总时间: 0 秒) |