I need help with switch, here is my part of my code that I need help with.
Scanner kb = new Scanner(System.in);
do
{
System.out.println("\nAt each turn, type: ");
System.out.println("P to print");
System.out.println("M to mix (shuffle the cards)");
System.out.println("S to save");
System.out.println("Q to quit");
System.out.println("Just ENTER to play a turn");
meun = kb.nextLine();
switch (meun)
{
case ("P"):
case ("p"): System.out.println("\nPlayer1 cards: " + p1.toString());
//More Codes...
case (//Would like to have an ENTER here.):
How do I just get an "enter" in the next case after P. What I want is that if the user just hit enter then the program will play another turn. I was thinking about doing String.valueOf(kb.nextLine())
but that does not work.
Thank you for your help.