Combining string values from an array
<p>I have created a loop that takes an int, turns it into a character array, and displays values based on the characters in the array. How can I print the values on the same line? In other words, instead of:</p>

<blockquote>
  <p>value</p>
  
  <p>value</p>
  
  <p>value</p>
</blockquote>

<p>I need:</p>

<blockquote>
  <p>value value value</p>
</blockquote>

<pre><code>public static int getValue(int number) {
  final PrintStream ps = System.out;
  for (char c : Integer.toString(number).toCharArray())
    switch (c) {
    case '0':
      ps.println('a');
      break;
    case '1':
      ps.println('b');
      break;
    case '2':
      ps.println('c');
      break;
    // etc.
    }
</code></pre>
