// This program reads a word from the user as a String // and checks its value to see if it is "Ruth". import java.util.*; public class TextInput { public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.print("Please type your name: "); String word = console.next(); System.out.println("You typed: " + word); if (word.equals("Ruth")) { System.out.println("Congratulations, Dr. Ruth!"); } else { System.out.println("Never heard of you."); } } }