Java Pattern Programs of Stars, Numbers and Alphabets

Here you will get list of java programs to print patterns of stars, numbers and alphabets. If you want code for any particular pattern then mention it in comment section, I will try to add the program here.

Java Pattern Programs

Patterns of Stars

Pattern 1:

Pattern 2:

Pattern 3:

Pattern 4:

Pattern 5:

Pattern 6:

Pattern 7:

Pattern 8:

Pattern 9:

Pattern 10:

Patterns of Numbers

Pattern 1:

Pattern 2:

Pattern 3:

Pattern 4:

This pattern is also known as pascal’s triangle.

Patterns of Alphabets

Pattern 1:

Pattern 2:

Pattern 3:

Feel free to ask your queries related to above java pattern programs in comment section.

20 comments

  • Kashish Gupta

    I want this pattern, :
    a b
    aa bb
    aaabbb

    Reply
    • shivani madhavaram

      class Untitled
      {
      public static void main(String[ ] args)
      {
      for(int i=1;i<=3;i++)
      {
      for(int j=1;j<=1;j++)
      {
      if(i==1)
      {
      System.out.print("a b");
      }
      else if(i==2)
      {
      System.out.print("aa bb");
      }
      else
      {
      System.out.print("aaabbb");
      }
      }
      System.out.println( );
      }
      }
      }

      Reply
  • Mohsin Sayyed

    Input
    N=5

    Output :
    L
    LE
    LED
    LE
    L

    How to print this pattern?

    Reply
  • Ashlyn

    How to print
    D
    A
    B A
    C B A
    D C B A

    Reply
  • Siddhartha

    How to print-
    * *
    * *
    * *
    * *
    * *

    Reply
    • shivani madhavaram

      class Notepad
      {
      public static void main(String[ ] args)
      {
      for(int i=1;i<=5;i++)
      {
      for(int j=1;j<=1;j++)
      {
      System.out.print("**");
      }
      System.out.println( );
      }
      }
      }

      Reply
  • Rahul Chavan

    A

    B D

    E H K

    Reply
  • Rajesh

    Input: PROGRAM
    Output:
    G
    GR
    GRA
    GRAM
    GRAMP
    GRAMPR
    GRAMPRO

    Reply
  • Ashish

    I want … this pattern
    A
    AB
    ABA
    ABAB
    ABABA

    Reply
  • Trisha jain

    Can you please solve this:

    a
    a 1
    a 2 a
    a 3 a 4
    a 5 a 6 a

    Reply
    • Pravleen Singh

      int max=10;
      int counter=0;
      int k=1;
      for(int i=0;i<max;i++)
      {

      for(int j=0;j<=i;j++)
      {
      if(j%2==0)
      {
      System.out.print("a");
      }
      else
      {
      System.out.print(k);
      k+=1;
      }
      }
      System.out.println();
      }

      Reply
  • Rajagopal

    How to do this program.???
    1234321
    123 321
    12 21
    1 1

    Reply
  • Kumar b

    I want this a-b-c patterns con some one help ,me for this, i need code.

    Reply
  • Devika

    program for the below pattern??
    AAAA1
    AAA12
    AA123
    A1234
    12345

    Reply
    • Wijaya

      How to do this program?
      Thank you
      *** *** ** *** **
      ** ** ** ** ** ** ** **
      ** *** ** ** ** ** **
      ** * ** ** ** ** **
      ** ** ** ** ** **
      ** ** **** ****

      Reply
  • DENNY OOMMACHAN

    how to make this pattern??

    *
    *A*
    *A*A*

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *