import java.util.HashSet; import java.util.Scanner; import java.util.Random; import java.util.ArrayList; import java.util.HashSet; /** * The InputReader class is used for read the input entry. * * @author Ahmad Lamaul Farid * @version 12 November 2020 */ public class InputReader { private Scanner reader; public InputReader() { reader = new Scanner(System.in); } /** * Read user input */ public HashSet getInput() { System.out.print(">> "); String inputLine = reader.nextLine().trim().toLowerCase(); String[] wordArray = inputLine.split(" "); HashSet words = new HashSet(); for(String word : wordArray) { words.add(word); } return words; } }