package methods;
import java.util.Scanner;
public class DisplayBox {
public static void box (int dimensions){
for (int i = 0; i < dimensions; i++) {
for (int j = 0; j < dimensions; j++) {
System.out.print(" *");
}
System.out.println("");
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner (System.in);
int length, width ;
System.out.println ("Please enter the length of the box");
length = input.nextInt();
System.out.println (" Please enter the width of the box");
width = input.nextInt();
input.close();
box (length);
box (width);
}
}
package methods;
import java.util.Scanner;
pu