1.加法符号的综合运用;(字符+数值)
2.字符串相加;
3.自增、自减(单独使用)
4.学习+=、-=、*=、/=、%=等符号的用法
5.学习a++(一元运算符)、4+6(二元运算符)、?(三元运算符)
public class ZhongFa{
public static void main (String[] args){
char var1='A';
System.out.println(var1+1);
System.out.println(var1);
System.out.println("Hello"+"huagong");
System.out.println("Hello"+"20");
System.out.println("Hello"+20);
System.out.println("Hello20"+50);
System.out.println("Hello"+(20+50));
System.out.println("==========");
int num1=10;
System.out.println(num1);
num1++;
System.out.println(num1);
++num1;
System.out.println(num1);
System.out.println("==========");
int num2=10;
System.out.println(num2);
System.out.println(num2++);
System.out.println(++num2);
System.out.println("==========");
int num3=10;
int result4=num3--;
System.out.println(result4);
System.out.println(num3);
System.out.println("==========");
int num4=10;
int num5=20;
int result5=++num4+num5--;
System.out.println(result5);
System.out.println(num4);
System.out.println(num5);
System.out.println("==========");
int num6=10;
num6+=10;
System.out.println(num6);
num6%=3;
System.out.println(num6);
byte num7=10;
num7+=10;
System.out.println("==========");
System.out.println(10>3);
System.out.println(10<3);
int num8=10;
int num9=10;
System.out.println(num8>=num9);
System.out.println(num8<=num9);
System.out.println(num8=num9);
System.out.println("=========");
System.out.println(3<4 && 10>8);
System.out.println(true && true);
System.out.println(true && false);
System.out.println(false && false);
System.out.println(true || true);
System.out.println(false || false);
System.out.println(false || true);
System.out.println(!true);
System.out.println(!false);
System.out.println("==========");
int num10=10;
System.out.println(3<4 && num10>10);
System.out.println(3<4 && num10>=10);
System.out.println(3<4 && num10++>10);
System.out.println(num10);
System.out.println(3<4 && ++num10>10);
System.out.println(num10);
System.out.println("==========");
num10=10;
System.out.println(3>4 && num10>10);
System.out.println(3>4 && num10>=10);
System.out.println(3>4 && num10++>10);
System.out.println(num10);
System.out.println(3>4 && ++num10>10);
System.out.println(num10);
System.out.println("==========");
int num11=10;
System.out.println(3<4 || num10>10);
System.out.println(3<4 || num10>=10);
System.out.println(3<4 || num10++>10);
System.out.println(num11);
System.out.println(3<4 || ++num10>10);
System.out.println(num11);
System.out.println("==========");
num11=10;
System.out.println(3>4 || num10>10);
System.out.println(3>4 || num10>=10);
System.out.println(3>4 || num10++>10);
System.out.println(num11);
System.out.println(3>4 || ++num10>10);
System.out.println(num11);
num11=10;
System.out.println(3>4 || ++num11>10);
System.out.println(num11);
System.out.println("===========");
int num12=10;
int num13=20;
int max=num12>num13?num12:num13;
System.out.println(max);
int min=num12>num13?num13:num12;
System.out.println(min);
System.out.println("2020080605034");
}
}
经历了几天的学习稍微有点思路了,加油!