Skip to content

Commit 20d719c

Browse files
committed
renamed: Java Basics/JFunction.class -> Core Java/JFunction.class
renamed: Java Basics/JFunction.java -> Core Java/JFunction.java renamed: Java Basics/JavaBacics.class -> Core Java/JavaBacics.class renamed: Java Basics/JavaBasics.class -> Core Java/JavaBasics.class renamed: Java Basics/JavaBasics.java -> Core Java/JavaBasics.java renamed: Java Basics/JavaLoops.class -> Core Java/JavaLoops.class renamed: Java Basics/JavaLoops.java -> Core Java/JavaLoops.java new file: Core Java/Jpatturn.java
1 parent f37a195 commit 20d719c

File tree

8 files changed

+56
-0
lines changed

8 files changed

+56
-0
lines changed

Core Java/Jpatturn.java

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
3+
ADVANCED PATTURN
4+
5+
6+
7+
*****
8+
* *
9+
* *
10+
*****
11+
12+
13+
public class Jpatturn{
14+
public static void hollow_rectangle(int rows, int col){
15+
for (int i=1; i<=rows; i++){
16+
for (int j=1; j<=col; j++){
17+
if (i==1 ||i==rows || j==1 || j==col){
18+
System.out.print(" * ");
19+
}
20+
else{
21+
System.out.print(" ");
22+
}
23+
24+
}
25+
System.out.println();
26+
}
27+
}
28+
29+
public static void main(String args[]){
30+
hollow_rectangle(7,7);
31+
}
32+
}
33+
34+
INVERTED ROTATED HALF PYRAMID
35+
*
36+
* *
37+
* * *
38+
* * * *
39+
* * * * *
40+
public class Jpatturn{
41+
public static void main(String args[]){
42+
inverted_rotated_half_Pyramid(5);
43+
}
44+
45+
public static void inverted_rotated_half_Pyramid(int n){
46+
for (int i=1; i<=n; i++){
47+
for (int j=1; j<=n-i; j++){
48+
Snystem.out.print(" ");
49+
}
50+
for (int j=1; j<=i; j++){
51+
System.out.print(" * ");
52+
}
53+
System.out.println();
54+
}
55+
}
56+
}*/

0 commit comments

Comments
 (0)