?? squareboard.java
字號:
// Exercise 3.6
public class SquareBoard { // Saved as "SquareBoard.java"
public static void main (String[] args) {
int size = 5; //the size of the square board
//print the board using 2 For loops
for (int row = 0; row <= size; row++) {// print the row of the board
for (int col = 0; col <= size; col++) {// print the col of the board
System.out.print("# "); // print without newline
}//all together print 5(size) "#"s at the end of the inner loop
System.out.println(); // for printing newline
}//all together print 5(size) lines at the end of the outer loop
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -