Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

25 Different Alphabet Pattern Programs in Java

I have already shared number pattern programs in java. In this article I will be sharing 25 alphabet pattern programs in java. This blog post is one of the best way to start your coding skills in java.
I have taken some alphabet pattern programs in java  and tried to solve them. Please add more pattern and code in the comment section.

Read Also :   Number Pattern Programs in Java

Alphabet Pattern Programs in Java - Pattern 1

A
B B
C C C
D D D D
E E E E E
F F F F F F
G G G G G G G



import java.util.Scanner; 
public class MainClass
{
public static void main(String[] args)
{ 
        Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");
 
        int alphabet = 65; // ASCII value of alphabet 'A'

for (int i=0; irows; i++)
{
for (int j=0; ji; j++)
{
System.out.print((char) alphabet + " ");
}
alphabet++;
System.out.println();
} 
 
        //Close the resources

sc.close();
    }
}


Alphabet Pattern Programs in Java - Pattern 2

A
A B
A B C
A B C D
A B C D E
A B C D E F
A B C D E F G


import java.util.Scanner;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i=0; i rows; i++)
{
for (int j=0; ji; j++)
{
System.out.print((char) (alphabet+j) + " ");
}
System.out.println();
}

//Close the resources

sc.close();
}
}


Alphabet Pattern Programs in Java - Pattern 3

G
G F
G F E
G F E D
G F E D C
G F E D C B
G F E D C B A



import java.util.Scanner;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i=rows-1; i>=0 ; i--)
{
for (int j=rows-1; j>=i; j--)
{
System.out.print((char) (alphabet+j) + " ");
}
System.out.println();
}

//Close the resources

sc.close();
}
}




Alphabet Pattern Programs in Java - Pattern 4

G F E D C B A
G F E D C B
G F E D C
G F E D
G F E
G F
G


import java.util.Scanner;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i=0; i rows-1 ; i++)
{
for (int j=rows-1; j>=i; j--)
{
System.out.print((char) (alphabet+j) + " ");
}
System.out.println();
}

//Close the resources

sc.close();
}
}


Alphabet Pattern Programs in Java - Pattern 5

A B C D E F G
A B C D E F
A B C D E
A B C D
A B C
A B
A


import java.util.Scanner;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i= rows-1; i>=0 ; i--)
{
for (int j=0; ji; j++)
{
System.out.print((char) (alphabet+j) + " ");
}
System.out.println();
}

//Close the resources

sc.close();
}
}


Alphabet Pattern Programs in Java - Pattern 6

A
B C
D E F
G H I J
K L M N O
P Q R S T U
V W X Y Z [ \


import java.util.Scanner;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i= 0; i rows-1 ; i++)
{
for (int j=0; ji; j++)
{
System.out.print((char) (alphabet++) + " ");
}
System.out.println();
}

//Close the resources

sc.close();
}
}


Alphabet Pattern Programs in Java - Pattern 7

       A
     A B
    A B C
   A B C D
  A B C D E
 A B C D E F
A B C D E F G


import java.util.*;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i= 0; i rows-1 ; i++)
{
for (int j=rows-1; j>i; j--)
{
System.out.print(" ");
}
for (int k=0; ki; k++)
{
System.out.print((char) (alphabet+k) + " ");
}
System.out.println();
}

//Close the resources

sc.close();
}
}


Alphabet Pattern Programs in Java - Pattern 8

A
B A
C B A
D C B A
E D C B A
F E D C B A
G F E D C B A



import java.util.*;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i= 0; i rows-1 ; i++)
{
for (int j=i; j>=0; j--)
{
System.out.print((char) (alphabet + j) + " ");
}
System.out.println();
}

//Close the resources

sc.close();
}
}

Alphabet Pattern Programs in Java - Pattern 9

        A
      ABA
     ABCBA
    ABCDCBA
   ABCDEDCBA
  ABCDEFEDCBA
 ABCDEFGFEDCBA



import java.util.*;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i= 0; i rows-1 ; i++)
{
for (int j=rows-1; j>=i; j--)
{
System.out.print(" ");
}
for (int k=0; ki; k++)
{
System.out.print((char) (alphabet+k));
}
for(int l=i-1; l>=0 ;l--)
{
System.out.print((char) (alphabet+l));
}
System.out.println();
}

//Close the resources

sc.close();
}
}


Alphabet Pattern Programs in Java - Pattern 10

      G
     F G
    E F G
   D E F G
  C D E F G
 B C D E F G
A B C D E F G



import java.util.*;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i= rows-1; i>= 0 ; i--)
{
for (int j=0; ji; j++)
{
System.out.print(" ");
}
for (int k=i; krows-1; k++)
{
System.out.print((char) (alphabet + k) + " ");
}
System.out.println();
}

//Close the resources

sc.close();
}
}

Alphabet Pattern Programs in Java - Pattern 11

 A B C D E F G
  A B C D E F
   A B C D E
    A B C D
     A B C
      A B
       A



import java.util.*;
public class MainClass
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

int alphabet = 65; // ASCII value of alphabet 'A'

for (int i= 0; i rows-1 ; i++)
{
for (int j=0; ji; j++)
{
System.out.print(" ");
}
for (int k=0; krows-1-i; k++)
{
System.out.print


This post first appeared on Java Hungry, please read the originial post: here

Share the post

25 Different Alphabet Pattern Programs in Java

×

Subscribe to Java Hungry

Get updates delivered right to your inbox!

Thank you for your subscription

×