So this is a silly question but for some reason this isn't working for me. This is a small part of a little program I am trying to do and I am debugging but a simple if statement isn't working for some reason. Here is the following code:
System.out.println("Enter a command (Enqueue, Dequeue, or Quit): ");
String expr = input.next();
System.out.println(expr);
if (expr=="Enqueue") {
System.out.println("Enqueue");}
So it should simply grab the input, and if I type Enqueue into the prompt it should print it out. The problem is that it isn't doing it. When I check the value of the variable expr it does show up as the string Enqueue but it doesn't go in and print it.....odd. Is there something dumb I am missing?