Method not working?
<p>Updated code:</p>

<pre><code>import java.util.*;

public class Main {

/**
 * @param args
 */
static int[] C;
static int[] D;
static String P;

public static void main(String[] args) {
    C = new int[10];
    D = new int[10];
    getNumber();
}

private static void getNumber() {
    System.out
            .println("Enter your first number with spaces in between digits.");
    Scanner S = new Scanner(System.in);
    String O = S.nextLine();
    String[] A = new String[10];
    A = O.split(" ");
    for (int X = 0; A.length &gt; X; X++) {
        C[X] = toNumber(A[X]);
    }
    String P = S.nextLine();
    String[] B = new String[10];
    B = P.split(" ");
    for (int Y = 0; B.length &gt; Y; Y++) {
        C[Y] = toNumber(A[Y]);
    }
    System.out.print(C[0]);
    remainders();
}

private static void remainders() {
    for (int A = 0; C.length &gt; A; A++) {
        if (D[1] * C[A] &gt;= 10) {
            Integer B = new Integer(D[1] * C[A]);
            Character E = B.toString().charAt(0);
            P.concat(E.toString());
        }
    }
    for (int A = 0; C.length &gt; A; A++) {
        if (D[0] * C[A] &gt;= 10) {
            Integer B = new Integer(D[1] * C[A]);
            Character E = B.toString().charAt(0);
            P.concat(E.toString());
        }
    }
    System.out.print(P);
}

private static int toNumber(String string) {
    if (string.equals("0")) {
        return 0;
    } else if (string.equals("1")) {
        return 1;
    } else if (string.equals("2")) {
        return 2;
    } else if (string.equals("3")) {
        return 3;
    } else if (string.equals("4")) {
        return 4;
    } else if (string.equals("5")) {
        return 5;
    } else if (string.equals("6")) {
        return 6;
    } else if (string.equals("7")) {
        return 7;
    } else if (string.equals("8")) {
        return 8;
    } else if (string.equals("9")) {
        return 9;
    } else {
        return 0;
    }
}

}
</code></pre>

<p>For some reason, the last thing it prints is <code>null</code>. I am pretty sure the problem is the <code>toNumber</code> method, but I can't figure out what's wrong. If there are other problems with the code other than this, please let me know. Please help.
Edit: Problem seems to be with remainder method, please help</p>
