class Demo{
public static void main(String[] args){
int x = 1;
for(show(‘a‘); show(‘b‘) && x<3; show(‘c‘)){
show(‘d‘);
x++;
}
}
public static boolean show(char ch){
System.out.print(ch);
return true;
}
}
输出为:abdcbdcb
原文:https://www.cnblogs.com/zjhjavalearn/p/13069875.html