Print 'JAVA' Pattern in Java
Print 'JAVA' Pattern in Java
Overview
A simple Java program that prints a stylized “JAVA” pattern using System.out.println.
Code Implementation
1
2
3
4
5
6
7
8
9
10
public class JavaPattern {
public static void main(String[] args) {
System.out.println();
System.out.println(" J A V V A");
System.out.println(" J A A V V A A");
System.out.println("J J AAAAA V V AAAAA");
System.out.println(" J J A A V A A");
System.out.println();
}
}
Sample Output
Technical Contributions and Reflection
- Structure of a Java class and
main()method - Console output with proper alignment
- Indentation style and spacing for clean output
Process Insights
- Manual alignment using spaces
- The importance of structure and formatting in code
- Writing clean, readable, and well-commented code from the beginning
