You multiply digits by digits and you do not correctly control the values โโof 10.
First you need to parse the strings into integers. You are on the right track. You can simplify loop indices, and you only need to call toCharArrayonce. For instance:.
After parsing, you can multiply integers.
EDIT: if this is not allowed, you need to implement an algorithm like this one , which is a bit more complicated.
(n + 1) x (m + n) ( ), m n - . 0, . . , , .
. :
int[][] intermediates = new int[3][4];
.