語句嵌套(for中for)、break(跳出)\continue(繼續)

/* 語句嵌套:就是語句中還有語句。 如今要學的是 循環嵌套。 */ class ForForDemo { public static void main(String[] args) { for (int x= 0;x<3;x++) { for (int y=0;y<4;y++) //共打印12次ok。 { System.out.println(「Ok」); } } } }web 打印星星 1*
相關文章
相關標籤/搜索