用输出指令和换行指令打印正方形

打印正方形 

用到输出信息指令还有换行指令

public class firstClass {

public static void main(String[] args) {

System.out.println("打印正方形");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.println("a");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.println("a");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.println("a");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.println("a");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.print("a");

System.out.println("a");

}

}

你可能感兴趣的:(java,开发语言)