/**
* 作者:Jz_xy
* 日期:2014.11.12
* 功能:乘方运算的使用
*/
package Demo1;
public class Demo1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Demo1 demo1=new Demo1();
}
public Demo1()
{
int a=10;
int b=2;
//其中,pow里面的数字a、b,分别为a:底数,b:指数
int c=(int) Math.pow(a,b);//乘方运算
System.out.println(c);
}
}
其实都是一些很简单的基本函数的使用方法,贴上来,以供之后不时之需!哈哈~