Getting the first word from each line?
<p>Having a hard time getting the first word from each line. Any ideas why it's outputting blank files? </p>

<p>The program takes the following text as input:</p>

<pre><code>abecedism   word created from the initials of words in a phrase
ablaut  variation in root vowel of words to change meaning
acronym word formed from initial letters of another word
acrophonic  using a symbol for the initial sound of a thing
acroteleutic    phrase or words at the end of a psalm
adversative word or phrase expressing opposition
</code></pre>

<p>And the aim is to get the results to look like this:</p>

<pre><code>abecedism   
ablaut  
acronym 
acrophonic  
acroteleutic    
adversative 
</code></pre>

<p>Here is the code so far: </p>

<pre><code>public static void main(String args[]) {
    String fileNameOutput = "OutputFile.txt";
    String fileName = "InputWords.txt";
    Charset cs = Charset.defaultCharset();
    try (BufferedReader bReader = Files.newBufferedReader(Paths.get(fileName), cs)) {
        PrintWriter outputStream = new PrintWriter(fileNameOutput);
        int lineNum = 0;
        String line = null;
        while ((line = bReader.readLine()) != null) {
            lineNum++;
            if (line.split(" ").length &gt; 1) continue;
            outputStream.println(line);
        }
        outputStream.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
</code></pre>