Star printing program in Java, pattern 2

Star printing program in Java, pattern 2 :





Code for this pattern : 


public class test {

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


Also try this in C.

Related post :

How to print Stars pattern in C                                          How to print Stars pattern in Java

Previous pattern                                                                                                         Next pattern



Star printing program in Java, pattern 2. How to print star in java and c programming.How to print star in java and c code. star printing code in java.