why doesn't the valid method work?
<p>Here is the code that I tried to make using J Creator LE. 
I'm still at beginner at this, I hope u could help me.</p>

<pre><code>public class TelNumHelper{
public static void main(String[] Args){
    String input = "1-800-FLO-WERS";
    String output = " ";
    int Key2,Key3,Key4,Key5,Key6,Key7,Key8,Key9,Key0;
    Key2 = 2;
    Key3 = 3;
    Key4 = 4;
    Key5 = 5;
    Key6 = 6;
    Key7 = 7;
    Key8 = 8;
    Key9 = 9;
    Key0 = 0;

    for(int i = 0;i&lt;input.length();i++){
        if(input.charAt(i)=='-'){
            output = output + input.charAt(i);
        }else{
            output = output + valid(input.charAt(i));
        }

    }

public static char valid(char input){

            if(input == A||input == B||input == C||input == 2){
                System.out.println(Key2);
            }else if(input == D||input == E||input == F||input == 3){
                System.out.println(Key3);
            }else if(input == G||input == H||input == I||input == 4){
                System.out.println(Key4);
            }else if(input == J||input == K||input == L||input == 5){
                System.out.println(Key5);
            }else if(input == M||input == N||input == O||input == 6){
                System.out.println(Key6);
            }else if(input == P||input == Q||input == R||input == S||input == 7){
                System.out.println(Key7);
            }else if(input == T||input == U||input == V||input == 8){
                System.out.println(Key8);
            }else if(input == W||input == X||input == Y||input == Z||input == 9){
                    System.out.println(Key9);
            }else if(input == 0){
                System.out.println(Key0);

            }else{
                System.out.println("Error");
            }
        }
    }
</code></pre>

<p>}</p>

<p>How do I make the method work?
I tried using different kinds of method, but it still does not work</p>

<p>This code should output numbers instead of characters, every char should be changed into numbers. I used the cellphone keypad as the basis for changing chars into numbers.</p>
