package com.loveCoding.j20250426_java_basic; /** * @author WanJl * @version 1.0 * @title Demo03 * @description * @create 2025/4/26 */ public class Demo03 { public static void main(String[] args) { //++ -- 都属于单目运算符,因为操作的数只有一个。 //符号放在操作数前和操作数后,操作的顺序和步骤是不一样的。 int a=1; System.out.println(a++); //先做其他运算,再做+1运算。 int b=1; System.out.println(++b); //先做+1运算,再做其他运算。 } }