Best Patterns in Java Program for 2024

Best Holo Patterns in java , Best java Patterns Que. in java program , Star pattern in java ,character pattern in java , number Pattern in java for learn patterns

pattern program in c.
pattern program in java.
pattern program in python.
pattern program in c++.

  1. Holo Patterns in java program , Star pattern in java ,char pattern in java , number Pattern in java
     *
    * *
   *   *
  *     *
 *       *
  *     *
   *   *
    * *
     *
class McqsList
{
   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");
         }


  }
}

2. Holo Patterns in java program , Star pattern in java ,char pattern in java , number Pattern in java

*****
*     *
*     *
*     *
*****

Patterns in Program

class McqsList
 {
 
      public static void main(String args[])
      {
            int row ,col;
                  for( row=1; row<=5 ; row++)
                    { 
                      for( col=1 ; col<=6 ; col++)
                           {
            if( col==1 || row==1 || row==5 || ( row==2 && j==6 ) ||( row==3 && col==6 ) || ( row==4  && col==6 ) )
               {
                    System.out.print("*");
                }
              else
               {
                 System.out.print(" ");
                } 
  
                    }
        System.out.print("\n");
      }
   }
}

Best Patterns in Program for 2024 Patterns in Program Best Patterns in Program for 2024

pattern program in c.
pattern program in java.
pattern program in python.
pattern program in c++.

pattern program in c. pattern program in java. pattern program in python. pattern program in c++.

Leave a Comment