Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int noOfWords = 0;
- String [] input = new String[100];
- while(!Console.endOfFile())
- {
- input[noOfWords] = Console.readToken();
- if (input[noOfWords] == "pardon" || input[noOfWords] == "excuse")
- input[noOfWords] += Console.readToken();
- noOfWords++;
- } // while
- for (int index = 0; index < noOfWords; index++)
- System.out.println((String) hashmap.get(input[index]) + " ");
Advertisement
Add Comment
Please, Sign In to add comment