2: import java.util.Scanner; 4: public class Question30 5: { 6: public static void main(String[] args) 7: { 8: Scanner keyboard = new Scanner(System.in); 10: String word1, word2, word3; 12: System.out.println("Type three words on one line:"); 13: word1 = keyboard.next( ); 14: word2 = keyboard.next( ); 15: word3 = keyboard.next( ); 17: System.out.println("You typed the words"); 18: System.out.println(word1 + " " + word2 + 19: " " + word3); 20: } 21: }