We usually use the drawing tools for simple graphics, today we use Java to print some simple graphics
The implementation code is as follows
Package test;
/** * * * @author Hanzel * @ Print Graphics */public class Array {public static void main (string[] args) {//Print Rectangle
Int[] A = new int[10];
for (int i=0; i<a.length;i++) {for (int j=0;j<a.length;j++) {System.out.print ("*");
} System.out.println ();
} System.out.println ();
Print inverted right-angled triangle int[] b = new INT[10];
for (int i=0; i<b.length;i++) {for (int j=0;j<b.length-i;j++) {System.out.print ("*");
} System.out.println ();
} System.out.println ();
Another inverted right-angled triangle int[] e = new INT[10];
for (int i=0;i<e.length;i++) {for (int j=0;j<i;j++) {System.out.print ("");
for (int m=0;m<e.length-i;m++) {System.out.print ("*");
} System.out.println ();
} System.out.println ();
Print out a parallelogram int[] c = new INT[10]; for (int i=0;i<c.length;i++) {for (int j=0;j<i;j++) {System.out.print ("");
for (int m=0;m<c.length;m++) {System.out.print ("*");
} System.out.println ();
} System.out.println ();
Another parallelogram int[] h = new INT[10];
for (int i=0; i
The above is the entire content of this article, this small program has a strong versatility, I hope to help you learn.