摘要:
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 阅读全文
摘要:
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 阅读全文