0
Hello, guys. All right? So I’d like to ask you a question. I created the following code:
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
String Resposta = "";
System.out.println("Digite a Combinação correta");
System.out.println("L, M, N, B");
System.out.println("Q, S, R, P");
System.out.println("D, G, H, V");
Resposta = entrada.nextLine();
System.out.println(Resposta);
if(Resposta == "Floripa"){
System.out.println("Show! Sou de Floripa");
}
}
}
the problem is this, when I type Floripa, the variable changes the value to Floripa, however if does not work