Java program to print diamond border star pattern

preview_player
Показать описание

In this video, I have practically demonstrated a Java program to print diamond border star pattern.
Рекомендации по теме
Комментарии
Автор

Best Explanation in the entire youtube, Thanks Sir.

gautamjangir
Автор

Perfectly explained. Thank you so much sir.

ashisenchoudhury
Автор

Very useful video! Thank you for demonstrating.

kittycat_
Автор

Sir
Can u solve my question? please..

Universaltruth
Автор

package Arrays;

public class PATTERN {
public static void main(String[] args) {
int rows=11 ;int space=rows/2;int star=1;int hallow=1;
for(int i=1;i<=rows;i++) {
for(int j=1;j<=space;j++) {
System.out.print(" ");
}
for(int k=1;k<=star;k++) {
if(k==1||k==hallow) {

}
else {
");
}
}
if(i<=rows/2) {
space--;
star=star+2;
hallow=star;
}
else {
space++;
star=star-2;
hallow=star;
}
System.out.println();
}

}

}

subbuEngineering