Possible Duplicate:
How do I compare strings in Java?
in my java app. To accept a challenge you press y but the program doesnt continue. Can anyone help me with this?
Here is my code:
import java.util.Scanner;
    public class MainApp 
    {
        public static void main(String[] args)
        {
            Scanner scanner = new Scanner(System.in);
            System.out.println("Hello User");
            System.out.println("Please Enter your first name");
            String name;
            name =scanner.next();
        System.out.println("\n" + " Hello " + name + "how are you today?");
        String y="";
        y=scanner.next();
        System.out.println("\n" + " Well " +  name + " I am " + y + " Too." +"\n" + " I have a riddle for you " + name + ", wll you Attempt it?" + "\n" + " Type y for yes , or n for no");
        String v;
        v=scanner.next();
        if(v == "y")
            {
            System.out.println("\n" + "How much wood could a wood chuck chuck if a wood chuck could chuck wood? :) " );
            }
        else if(v == "n")
            {
            System.out.println("Ok then " + name + " suit youself, Goodbye! :) ");
            }
        else 
            { 
            System.out.println("Please pick y, or n , and make sure it is in lower case");
            }
        }
    }
 
     
     
    