Assignment #30 Comparing Strings

Code

    
    /// Name: Lacey Reese 
    /// Period: 5
    /// Program Name: ComparingStrings
    /// File Name: ComparingStrings.java
    /// Date Finished 10/12/2015
    
import java.util.Scanner;

public class ComparingStrings
{
   public static void main( String[] args )
   {
   
   Scanner Lacey= new Scanner(System.in);
   
   String word;
   boolean yes, no;
   
   System.out.println( " Type the word \"weasel\", please." );
   word=Lacey.next();
   
   yes= "weasel".equals(word);
   no= ! word.equals("weasel");
   
   System.out.println( "You typed what was requested: " + yes + " ");
   System.out.println( " You ignored polite instructions: " + no + " ");
   }
}
    

Picture of the output

// Assignment 30