Read a line from console in Java
Is the use of a Set for storing the tokens deliberate? That's because you can only have unique elements in the Set, and the output of the following code snippet will be 1, not 2:

System.out.println( new HashSet&lt;&gt;( Arrays.asList( "a a".split( " " ) ) ).size() );


Also, what you are doing is to store one token into a new List via Arrays.asList(), this is then iterated for elements to be stored into a new HashSet, which is finally added to setOfStrings. May we know what exactly are you trying to do here? I'll attempt to illustrate the output for the following:

Input:

a b c
d e f


Output:

setOfStrings
    new HashSet [ "a" ]
    new HashSet [ "b" ]
    new HashSet [ "c" ]
    new HashSet [ "d" ]
    new HashSet [ "e" ]
    new HashSet [ "f" ]


edit:

After reading your comment, I think what you're looking for is this:

while ((currentLine = bufferedReader.readLine()) != null) {
    String[] tokens = currentLine.split(" ");
    setOfStrings.add(new HashSet&lt;String&gt;(Arrays.asList(tokens)));
}


You do not have to iterate through tokens... Alternative suggestion relying on the utility method from the Collections class:

while ((currentLine = bufferedReader.readLine()) != null) {
    Set&lt;String&gt; hashSet = new HashSet&lt;&gt;();
    Collections.addAll( hashSet, currentLine.split( " " ) );
    setOfStrings.add(hashSet);
}


Do pay attention to its Javadoc: "The behavior of this convenience method is identical to that of c.addAll(Arrays.asList(elements)), but this method is likely to run significantly faster under most implementations." :)