Read data in from text file, convert each word to PigLatin
<p>I'm having trouble printing out the final result without each word being on its own line. The output should be formatted just as the input was. Here is the code I used to read the data and print it:</p>

<pre><code>     Scanner sc2 = null;
        try {
            sc2 = new Scanner(new File(dataFile));
        } catch (FileNotFoundException e) {
            e.printStackTrace();  
        }
        while (sc2.hasNextLine()) {
                Scanner s2 = new Scanner(sc2.nextLine());
            boolean b;
            while (b = s2.hasNext()) {
                String s = s2.next();
                System.out.println(pig(s));
            }
        }
</code></pre>

<p>The actual instructions were as follows: "Translate the Declaration of Independence ("declaration.txt") into PigLatin.  Try to preserve the paragraphs.  There are several ways to do this, but they all use nested loops.  You may want to look at nextLine, next, split, or StringTokenizer."</p>

<p>We haven't been taught how to use any of the methods listed there, though.</p>
