转载自:http://blog.csdn.net/xuelongzr/article/details/6943804
下列程序的输出结果是?
public class Test2 {
static boolean foo(char c) {
System.out.print(c);
Return true;
}
public static void main(String[] argv) {
int i = 0;
for (foo('A'); foo('B') && (i < 2); foo('C')) {
i++;
foo('D');
}
}
}
答案:ABDC BDC B