Assignment #49 and Gender Game

Code

    /// Name: Lauren Baird
    /// Period: 7
    /// Program Name: Gender Game
    /// File Name: GenderGame.java
    /// Date Finished: 10/20/2015
    
    import java.util.Scanner;
    
    public class GenderGame
    {
        public static void main( String[] args )
        {
            Scanner keyboard = new Scanner(System.in);
            
            String gender, first, last, married;
            int age;
            
            System.out.print( "What is your gender (M or F): " );
            gender = keyboard.next();
            
            System.out.print( "First name: " );
            first = keyboard.next();
            
            System.out.print( "Last name: " );
            last = keyboard.next();
            
            System.out.print( "Age: " );
            age = keyboard.nextInt();
            
            System.out.println();
            
            if ( age >= 20 && gender == "F" )
            {
                System.out.println( "Are you married, " + first + "(Y or N): ");
                married = keyboard.next();
                
                if ( married == "Y" );
                {
                    System.out.println( "Then I shall call you Mrs. " + last + "." );
                }
                
                if ( married == "N" );
                {
                    System.out.println( "Then I shall call you Ms. " + last + "." );
                }
            }
            
            if ( age < 20 )
            {
                System.out.println( "Then I shall call you " + first + " " + last + "." );
            }
            
            if ( age >= 20 && gender == "M" )
            {
                System.out.println( "Then I shall call you Mr. " + last + "." );
            }
        }
    }  
    

Picture of the output

Assignment #49