include spaces rather than dashes in the case of a space
<p>OK first I'd like to say I'm new to Java Development...
With that in mind I'm currently trying to make the value of tryWord include spaces rather than dashes in the case of a space in s. can anyone help me? </p>

<pre><code>    String tryWord = "";
    for (int i = 0; i &lt; s.length(); i++) {
        tryWord += "-";
    }
    System.out.println(s + tryWord);

Value for s
------------
private static String randomOutput() {
    String array[] = new String[10];
    array[0] = "Hamlet";
    array[1] = "Mysts of Avalon";
    array[2] = "The Iliad";
    array[3] = "Tales from Edger Allan Poe";
    array[4] = "The Children of Hurin";
    array[5] = "The Red Badge of Courage";
    array[6] = "Of Mice and Men";
    array[7] =  "Utopia"; 
    array[8] =  "Chariots of the Gods";
    array[9] =  "a Brief History of Time";

    ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;(Arrays.asList(array));
    Collections.shuffle(list);
    String s = list.get(0);
    return s;
}
</code></pre>
