title: Infix to postfix with real (postive and negative) numbers
body: <p>I've written a program that allows translation from infix to postfix expression but it works only for one digit <code>[A-Z][a-z][0-9]</code>. How can I do to make it possible for real (positive and negative) numbers? </p>
  
  <pre><code>Example: (50 + 3.75) + 50 --&gt; 50 3.75 + 50 +
  </code></pre>
  
  <p>doTrans() which allows translation from infix to postfix</p>
  
  <pre><code>public String doTrans() {
          for (int j = 0; j &lt; input.length(); j++) {
              char ch = input.charAt(j);
              theStack.displayStack("For " + ch + " ");
              switch (ch) {
              case '+':
              case '-':
                  gotOper(ch, 1);
                  break;
              case '*':
              case '/':
                  gotOper(ch, 2);
                  break;
              case '(':
                  theStack.push(ch);
                  break;
              case ')':
                  gotParen(ch);
                  break;
              default:
                  output = output + ch;
                  break;
              }
          }
          while (!theStack.isEmpty()) {
              theStack.displayStack("While ");
              output = output + theStack.pop();
          }
          theStack.displayStack("End ");
          return output;
      }
  </code></pre>
  
  <p>The problem in this line <code>output = output + ch;</code>. I can't find a solution for how to get the whole number instead of only one digit</p>