126k views
4 votes
Write a Java program that prints out a 4x4 square (like the one below)

Write a Java program that prints out a 4x4 square (like the one below)-example-1
User First Zero
by
4.0k points

1 Answer

4 votes

public class 4by4Square

{

public static void main(){

System.out.println("xxxx \\x x\\x x\\xxxx");

}

}

~CaptnCoderYankee

User Nico Toub
by
4.4k points