document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import java.util.*;
  2. /**
  3.  * The InputReader class is used for read the input entry.
  4.  *
  5.  * @author      Muhammad Bagus Istighfar
  6.  * @version     0.1 - 11 November 2020
  7.  */
  8. public class InputReader
  9. {
  10.     private Scanner reader;
  11.     public InputReader()
  12.     {
  13.         reader = new Scanner(System.in);
  14.     }
  15.     /**
  16.      * Read user input
  17.      */
  18.     public HashSet<String> getInput()
  19.     {
  20.         System.out.print(">> ");
  21.         String inputLine = reader.nextLine().trim().toLowerCase();
  22.        
  23.         String[] wordArray = inputLine.split(" ");
  24.            
  25.         HashSet<String> words = new HashSet<String>();
  26.         for(String word : wordArray)
  27.         {
  28.             words.add(word);
  29.         }
  30.         return words;
  31.     }
  32. }
');