- 博客(5)
- 收藏
- 关注
原创 java循环语句
1.while(表达式){ 循环体或循环内容 } 栗子 int i = 1; while(i System.out.println("上课迟到罚俯卧撑"+i+“次”); i++; } 2.do{ 循环内容 }while(表达式); 栗子 int i = 1; do{ System.out.println("上课迟到罚俯卧撑"+i+“次”); i++;
2017-02-28 14:50:31
334
原创 java逻辑运算
& 与 && 运算符左边为false时,不再对右边计算 I 或 II 运算符左边为true时,不再对右边计算 !非 逻辑运算优先级(非关系运算) 非>与>或 关系运算 5>4
2017-02-28 10:38:26
288
原创 java编程基础 switch语句的贯穿现象
int score = 4; swtich (score){ case 5: score++; case 4: score++ case 3: score++; case 2: score++ case 1: score++; case 0: score++ default: System.out.println(score); } 最后score的结果为9
2017-02-28 09:48:17
1137
转载 实例化 Sting newSting()
栗子1 Student student; Student是你的类,student是你声明的对象,这个就是对象的声明 然后你再 student=new Student(); 这个new的过程就叫实例化 对象声明后是不分配空间的,而这个new的过程给他分配空间 就是把抽象的概念具体化了 比如这个Student是指学生类,用new Student()给他具体指定了st
2017-02-15 11:31:30
306
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅