2013年5月1日

第4章 控制执行流程

摘要: 4.4 Foreach可以用于实现了java.lang.Iterable接口的对象。4.7 带标号的break和continue为了方便跳出多层循环而设计,需要与VB和C中的GOTO语句区别的是,标号需要直接写在需要跳出的循环开始的前一行。View Code 1 import static java.lang.System.out; 2 public class HelloWorld{ 3 4 public static void main(String []args){ 5 for(int i = 0; i < 5; ++i) { 6 inn... 阅读全文

posted @ 2013-05-01 14:45 peter9606 阅读(149) 评论(0) 推荐(0) 编辑

第3章 操作符

摘要: 3.4 赋值基本类型的赋值与C++/C一样View Code 1 import static java.lang.System.out; 2 public class HelloWorld{ 3 4 public static void main(String []args){ 5 int a = 3; 6 int b = a; 7 b = 5; 8 out.println("a : " + a + ", b : " + b); 9 }10 } 11 /*Output : 12 a : 3,... 阅读全文

posted @ 2013-05-01 12:54 peter9606 阅读(113) 评论(0) 推荐(0) 编辑

导航