My code looks like this, I wanted to design my program, something like a card, it'll ask for a color then print out a message.
My problem is, I can't really close it up...
import java.util.Scanner;
public class Main{
public static void main(String args[]) {
Scanner cin = new Scanner(System.in);
String color;
System.out.println("------------------------------------------------------");
System.out.println("| Welcome Card!! |");
System.out.println("| Pick a color |");
System.out.println("| |");
System.out.println("| Green, Blue, Red, Orange |");
System.out.println("| |");
System.out.println("| |");
System.out.print("|\t\t\t\t "); color = cin.nextLine();
switch (color.toLowerCase()){
case "blue":
System.out.println("| Success |");
System.out.println("------------------------------------------------------");
break;
default:
System.out.println("unsuccessful");
}
}
}
the output looks like this:
------------------------------------------------------
| Welcome Card!! |
| Pick a color |
| |
| Green, Blue, Red, Orange |
| |
| |
| blue
| Success |
------------------------------------------------------
what I want to achieve:
------------------------------------------------------
| Welcome Card!! |
| Pick a color |
| |
| Green, Blue, Red, Orange |
| |
| |
| blue |
| Success |
------------------------------------------------------
It's still a rough draft, just tryna figure out how to put another vertical line on that gap...