-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathletter.java
More file actions
25 lines (22 loc) · 717 Bytes
/
letter.java
File metadata and controls
25 lines (22 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
public class letter {
public static void main(String[] args) {
String letter[][]= new String[7][6];
for (int i = 0; i < letter.length; i++) {
for (int j = 0; j < letter[i].length; j++) {
if(i== 0 || i == 3 || i == letter[i].length ){
letter[i][j]=" * ";
}else if(j==0 || j == letter[i].length-1){
letter[i][j]=" * ";
}else{
letter[i][j] = " ";
}
}
}
for (String[] row : letter){
for (String col : row){
System.out.print(col);
}
System.out.println();
}
}
}