Write a Java program to draw pattern 1

Write a Java program to draw a pattern like mentioned below:

Java Program - Pattern 1

public class DrawPattern1 {
 
	public static void main(String[] args) {
		String s = "ABC";
		for (int row = 1; row <= 6; row++) {
			for (int col = 1; col <= 6; col++) {
				if(col <= row){
					System.out.print(col);
				} else {
					System.out.print("*");
				}
				
			}
			System.out.println();
		}
 
	}
}

Author: Mahesh

Technical Lead with 10 plus years of experience in developing web applications using Java/J2EE and web technologies. Strong in design and integration problem solving skills. Ability to learn, unlearn and relearn with strong written and verbal communications.