operator-Demo04
作者:互联网
package operator; public class Demo04 { public static void main(String[] args) { //++ -- 自增 自减 一元运算符 int a = 3; int b = a++; //先赋值再自增 int c = ++a; //先自增再赋值 System.out.println(a); System.out.println(b); System.out.println(c); //幂运算 2^3=2*2*2=8 double pow = Math.pow(2, 3); System.out.println(pow); } }
标签:int,pow,++,System,println,Demo04,operator,out 来源: https://www.cnblogs.com/iamaghao/p/15311036.html