Write a java program that would display the 8 shape using the ‘*’ characte
SOLUTION TO THE ABOVE QUESTION
SOLUTION CODE
package com.company;
public class Main {
public static void main(String[] args) {
// write your code here
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(" * * *");
}
}
SAMPLE PROGRAM OUTPUT
Comments
Leave a comment