摘要:
public class Demo5 { public static void main(String[] args) { // 0-100之间奇数odd和偶数even的和 int oddSum = 0; int evenSum = 0; for (int i = 0; i <= 100; i++) 阅读全文
摘要:
一、扩展复制运算符 int a = 10; int b = 20; //字符串连接 System.out.println(""+a+b); //1020 System.out.println(a+b+""); //30 二、三元运算符 x?y:z //如果x的结果为true,则等于y,否则等于z 阅读全文
摘要:
一、逻辑运算符 &&:逻辑与运算:两个变量都为真,结果才为true ||:逻辑或运算:两个变量有一个为真,结果即为true !:否:如果是真变成假,如果是假变成真 //短路运算符 int c = 5; boolean d = (c<4)&&(c++<4); 二、位运算 A = 0011 1100 B 阅读全文
摘要:
一、关键字 abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally floast for goto if imp 阅读全文