What is the correct way to put string in a condition statement? I tried this, but it won't print x.
String c = "c" ,d = "d";
Scanner in = new Scanner(System.in);
String selection = in.next();
if ( c == selection){
System.out.println("x");
Assume I input c.