Strange behavior with java strings
<p>I have two string variables ticker and detail. I'm trying to print out the two strings in one line. It just wouldn't work. I've tried so many different ways of doing this. To exclude the possibility of an uninitialized string I tried printing them out in different lines ... this works.</p>

<p>This example works ... except that the output needs to be in one line.</p>

<pre><code>            System.out.println(ticker);
            System.out.println(detail);
</code></pre>

<p>And the output is:</p>

<pre><code>IWM
|0#0.0|0#0.0|0#-4252#386|
GLD
|0#0.0|0#0.0|0#-4704#818|
</code></pre>

<p>When I try to put the output into one line in any of many ways, I get only the ticker ... the detail string is just not printed ... not to console or to file. Here are some example code snippets that produce the same result:</p>

<p>Attempt 1:</p>

<pre><code> System.out.println(ticker.concat(detail));
</code></pre>

<p>Attempt 2:</p>

<pre><code>System.out.println(ticker+detail);
</code></pre>

<p>Attempt 3:</p>

<pre><code>StringBuffer sb = new StringBuffer();
sb.append(ticker);
sb.append(detail);
System.out.print(sb.toString());
</code></pre>

<p>Attempt 4:</p>

<pre><code>System.out.print(ticker);
System.out.println(detail);
</code></pre>

<p>In all the above attempts, I get the following output ... as if the detail part is ignored:</p>

<pre><code>GOLD
BBL
SI
</code></pre>

<p>What could be causing these symptoms? Is there a way to get the two strings printed in one line?</p>
