?? graphics.java
字號:
import java.io.IOException;
public class graphics {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
int number = 9 ;
xH(number);
}
public static void xH(int value) throws IOException{
int i = 0 ;
int j = 0 ;
for(j = 0 ; j < value/2 ; j++){
for(int k = 0 ; k < value/2 - j ; k++){
System.out.print(" ");
}
for(i = 0 ; i < 2 *j +1 ; i++){
System.out.print(" " + "*");
}
System.out.println("\n\n");
}
for(j = value/2 ; j >= 0 ; j--){
for(int k = 0 ; k < value/2 - j ; k++){
System.out.print(" ");
}
for(i = 0 ; i < 2 *j +1 ; i++)
System.out.print(" " + "*");
System.out.println("\n\n");
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -