Best Patterns in Java Program 2024″ suggests a tutorial or resource showcasing some of the most effective and visually appealing patterns achievable through Java programming in the year 2024. Here’s a description of what such a resource might include.
*
* *
* *
* *
* *
* *
* *
* *
*
class McqsListHolo02 {
public static void main(String args[]){
int row ,col;
for (row=1;row<=5;row++){
for ( col=5 ; col>=row ; col--){
System.out.print(" ");
}
for( col=1 ; col<=row ; col++){
if( col==1 || col==row){
System.out.print("* ");
}else{
System.out.print(" ");
}
}
System.out.print("\n");
}
for(row=1;row<=4;row++){
for(col=0;col<=row;col++){
System.out.print(" ");
}
for(col=4;col>=row ;col--){
if(col==4 || col==row ){
System.out.print("* ");
}else{
System.out.print(" ");
}
}
System.out.print("\n");
}
}
}