The following code contains a bug. Examine the code and figure out the case(s) in which the code would behave incorrectly. Then correct the bug in the code.
Scanner console = new Scanner(System.in);
System ("What is your favorite color? ");
String name = ();
if (name == "blue") {
System.out.println("Mine, too!");
}