strayromeo
宠辱不惊,闲看庭前花开花落。 去留无意,谩随天外云卷云舒。
摘要: example: /** * java中类似c#的foreach语法 */ private void testForeach() { String items [] = new String[] { "azhi", "afeng" }; for(String item : items) { System.out.println(item); } }result:azhiafeng 阅读全文
posted @ 2009-07-06 15:49 strayromeo 阅读(483) 评论(0) 推荐(0) 编辑
摘要: 语法如下:/** * java中的label转跳,只能紧挨着循环而定义否则代码中使用到就会编译不通过,如果没有使用到可以正常编译通过。 */ private void testLabel() { Label: for(int i = 0; i < 10; i++) { if(i == 9) continue Label; if(i == 7) continue Label; System.o... 阅读全文
posted @ 2009-07-06 15:47 strayromeo 阅读(1036) 评论(0) 推荐(0) 编辑