Java Print Rect
# Java Example β Print Rectangle
[ Java Example](#)
Output a rectangle.
## Example
public class Rect{public static void main(String[]args){//Outer loop, outputs one line each timefor(int i = 1; i<= 5; i++){System.out.print("*"); //Inner loop, outputs one * each timefor(int j = 1; j<= 5; j++){System.out.print("*"); }System.out.println(); }}}
Output:
****** ****** ****** ****** *****Java Example](#)
YouTip