This example will provide how to print an American flag on the screen in Java
Example:
package octopuscodes.com.demo;
public class Demo {
public static void main(String[] args) {
System.out.println("* * * * * * ==================================");
System.out.println(" * * * * * ==================================");
System.out.println("* * * * * * ==================================");
System.out.println(" * * * * * ==================================");
System.out.println("* * * * * * ==================================");
System.out.println(" * * * * * ==================================");
System.out.println("* * * * * * ==================================");
System.out.println(" * * * * * ==================================");
System.out.println("* * * * * * ==================================");
System.out.println("==============================================");
System.out.println("==============================================");
System.out.println("==============================================");
System.out.println("==============================================");
System.out.println("==============================================");
System.out.println("==============================================");
}
}
Output:
* * * * * * ==================================
* * * * * ==================================
* * * * * * ==================================
* * * * * ==================================
* * * * * * ==================================
* * * * * ==================================
* * * * * * ==================================
* * * * * ==================================
* * * * * * ==================================
==============================================
==============================================
==============================================
==============================================
==============================================
==============================================