class Five { public static void main(String[] args) { Five.mystery(Integer.parseInt(args[0])); } public static void mystery(int size) { if (size <= 6) { return; // too small, won't draw it. } for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { if (i == j || j == 0 || j == size-1) System.out.print("* "); else System.out.print(" "); } System.out.println(); } } }