摘要: 三元运算符 package operator; // 三元运算符 public class Demo08 { public static void main(String[] args) { // x ? y : z //如果x==true,则结果为y,否则结果为z int score=80; St 阅读全文
posted @ 2021-09-13 23:19 dashuiy 阅读(16) 评论(0) 推荐(0)
摘要: 扩展赋值运算符和字符连接串 package operator; public class Demo07 { public static void main(String []args){ int a=10; int b=20; a+=b; //a=a+b System.out.println(a); 阅读全文
posted @ 2021-09-13 23:17 dashuiy 阅读(37) 评论(0) 推荐(0)
摘要: 与或非 package operator; public class Demo05 { public static void main(String[] args) { // 与(and) 或(or) 非(取反) boolean a=true; boolean b=false; System.out 阅读全文
posted @ 2021-09-13 23:09 dashuiy 阅读(302) 评论(0) 推荐(0)