Estoy intentando hacer un programa para preguntarme palabras de frances a mi mismo. He hecho este codigo, pero ponga lo que ponga me sale "Your answer is incorrect." (else condition). Ayuda please.
import java.util.Scanner;
public class AprenderPalabras {
public static void main(String[] args) {
Scanner wordL= new Scanner(System.in);
Scanner wordR = new Scanner(System.in);
Scanner answer= new Scanner(System.in);
String wordL1= wordL.nextLine();
String wordR1= wordR.nextLine();
System.out.println(wordL1 + " -> ");
String answer1= answer.nextLine();
if (answer1==wordR1){
System.out.println("Your answer is correct.");
}
else {
System.out.println("Your answer is incorrect.");
}
}
}