Java Alphabet Pattern 22

Java Alphabet Pattern 22

Try to print the following alphabet pattern using Java.

Print This Output
        A
      B C
    D E F
  G H I J
K L M N O

Source Code

Java Compiler
public class myClass { public static void main(String[] args) { int i, j; int k = 65; for(i=65; i<=69; i++) { for(j=69; j>=65; j--) { if(j > i) System.out.print(" "); else System.out.format("%2c", k++); } System.out.println(); } } }

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author