I want to draw a triangle with stars like below using for loop, but i really don\'t have any idea of how to do this ? Triangle is going to be like this:
public class StarA {
public static void main(String[] args) {
for( int i = 1; i <= 5; i++ )
{
for( int j = 0; j < i; j++ )
{
System.out.print("*");
}
System.out.println();
}
}
}