Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Square star pattern in java

class squarePattern {
  public static void main(String[] args) {

    // size of the square
    int size = 5;
    // outer loop
    for (int i = 0; i < size; i++) {
      // inner loop
      for (int j = 0; j < size; j++) {
        System.out.print("*");
      }
      System.out.println();
    }
  }
}
Comment

PREVIOUS NEXT
Code Example
Java :: java xml element get attribute value 
Java :: java stream code to ignore null 
Java :: fullscreen java 
Java :: split string into array java 
Java :: change attributes of player spigot 
Java :: android activity keyboard hide 
Java :: arraylist<hashmap<string, string arraylist = new arraylist<() 
Java :: Explain JDK, JRE and JVM? 
Java :: Unexpected end of file in android studio activity main.xml 
Java :: functional interface java 
Java :: how to hash string in java 
Java :: how to disable the cors in spring boot 
Java :: current port used by the Java application 
Java :: java add element to map 
Java :: how to create dynamic string array in java 
Java :: java regular expressions 
Java :: generic method lambda java 
Java :: java heap sort heapify geeks for geeks 
Java :: GetMapping("/rest/v1/books") in spring rest api 
Java :: java create array with values 
Java :: fill array java 
Java :: Java Define a Functional Interface in java 
Java :: Java void Keyword 
Java :: User input (scanner) 
Java :: down casting java 
Java :: how to find lcm of two numbers java 
Java :: how to close scanner in java 
Java :: java tree traversal 
Java :: the java_home environment variable is not defined correctly on mac 
Java :: java first index of an arraylist 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =