Write a Java program that can draw a box with the given height, width, and character.
public class App {
public static void main(String[] args) throws Exception {
// scanner
Scanner scanner = new Scanner(System.in);
// get the input height
// get the input width
// get the character to be used in drawing the box
// print the result
scanner.close();
}
}
height: 3
width: 4
character: %
% % % %
% % % %
% % % %
height: 5
width: 3
character: *
* * *
* * *
* * *
* * *
* * *
height: 2
width: 2
character: *
* *
* *
height: 1
width: 1
character: X
X