Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java code examples

public class Main {

  public static void main(String[] args) {
    int rows = 5;

    for (int i = 1; i <= rows; ++i) {
      for (int j = 1; j <= i; ++j) {
        System.out.print("* ");
      }
      System.out.println();
    }
  }
}
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #java #code #examples
ADD COMMENT
Topic
Name
7+4 =