Having trouble with a switch statement in Java
<p>I want my program to write out the number you typed in words. eg. 52 = fifty two.
What am i doing wrong here ???
It doesnt want to accept the words but i cant change the variables to strings either so im stuck !</p>

<pre><code>import javax.swing.*;

public class Switch
{

public static void main (String [] args )
{

int number = Integer.parseInt (JOptionPane.showInputDialog("Type in a number between 0 - 100 :") );

int num1 = 0;
int num2 = 0;

    switch( num1 )
        { 
         case 1 : num1 = "One" ;break;
         case 2 : num1 = "Two";break;
         case 3 : num1 = "Three";break;
         case 4 : num1 = "Four";break;
         case 5 : num1 = "Five";break;
         case 6 : num1 = "Six";break;
         case 7 : num1 = "Seven";break;
         case 8 : num1 = "Eight";break;
         case 9 : num1 = "Nine";break;
            default:    System.out.println("Incorrect input");
                        break;
      }

      switch( num2 )
        {
         case 1 : num2 = "Teen";break;
         case 2 : num2 = "Twenty";break;
         case 3 : num2 = "Thirty";break;
         case 4 : num2 = "Fourty";break;
         case 5 : num2 = "Fifty";break;
         case 6 : num2 = "Sixty";break;
         case 7 : num2 = "Seventy";break;
         case 8 : num2 = "Eighty";break;
         case 9 : num2 = "Ninety";break;
            default:    System.out.println("Incorrect input");
                        break;
      }

      System.out.println(num1 + num2);

}

}
</code></pre>