Write a Java program to print a face
public class Exercise16 { public static void main(String[] args) { System.out.println(" +"""""+ "); System.out.println("[| o o |]"); System.out.println(" | ^ | "); System.out.println(" | '-' | "); System.out.println(" +-----+ "); } }
public class Main { public static void main(String[] args) { String[] arra = new String[5]; arra[0] = " +"""""+ "; arra[1] = "[| o o |]"; arra[2] = " | ^ |"; arra[3] = " | '-' |"; arra[4] = " +-----+"; for (int i = 0; i < 5; i++) { System.out.println(arra[i]); } } }
Sample Output:
+"""""+ [| o o |] | ^ | | '-' | +-----+
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer