2
In case I know how to do with int
which would be something like:
number1 = input.nextInt();
But I want my user to enter a string, let’s assume a month:
mes = input.????
I need to read the string in a switch
, as in the example below:
switch (mes) {
case "janeiro": System.out.println("Nesta data ocorre o evento chamado: Feriado de janeiro");
break;
Try
input.next()
.– ptkato