摘要: public class LabeledFor { public static void main(String[] args) { int i = 0; outer: // Can’t have statements here for (; i<10;i++) { // infinite loop inner: // Can’t have statements here for (; i < 10; i++) { out.print("i = " + i); if (i == 2) { out.println("continue"); co 阅读全文
posted @ 2010-08-26 15:43 jrvin 阅读(294) 评论(0) 推荐(0) 编辑
摘要: If you shift a char, byte, or short, it will be promoted to int before the shift takes place, and the result will be an int. Only the five low-order bits of the right-hand side will be used. This prevents you from shifting more than the number of bits in an int. If you’re operating on a long, you’ll 阅读全文
posted @ 2010-08-26 14:27 jrvin 阅读(483) 评论(0) 推荐(0) 编辑