Horje
Pyramid star pattern in java Code Example
Pyramid star pattern in java
class pyramid {
  // pyramid star pattern
  public static void main(String[] args) {

    int size = 5;
    for (int i = 0; i < size; i++) {
      // print spaces
      for (int j = 0; j < size - i - 1; j++) {
        System.out.print(" ");
      }
      // print stars
      for (int k = 0; k < 2 * i + 1; k++) {
        System.out.print("*");
      }
      System.out.println();
    }
  }
}




Java

Related
jframe open another frame using button actionlistener Code Example jframe open another frame using button actionlistener Code Example
single dex file error android Code Example single dex file error android Code Example
13 live Code Example 13 live Code Example
java system.out.println not working Code Example java system.out.println not working Code Example
java find index of first alpha character in string Code Example java find index of first alpha character in string Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9