Problems when multiplying numbers from a string

Hello everyone. I am writing a program in which I have a string, called num, that is a very long number. I am trying to pull the first few digits of that number and multiply them together, however when I do, I get a very big result (billions of times larger than it should). Here is my code:

Code:

`int indx = 0; //just a variable for the index of the string`

String num = "12345678901234567890";

int product = ((num.charAt(indx))*(num.charAt(indx + 1))*(num.charAt(indx + 2))*(num.charAt(indx + 3))*(num.charAt(indx + 4)));

Since this didn't work, I put each in its own separate int and tried multiplying them again:

Code:

` int aa = (num2.charAt(indx));`

int ab = (num2.charAt(indx + 1));

int ac = (num2.charAt(indx + 2));

int ad = (num2.charAt(indx + 3));

int ae = (num2.charAt(indx + 4));

int aaaa = aa*ab*ac*ad*ae;

System.out.println(aaaa);

And I still got the same result. When I print each digit separately, I get the right values, but when I multiply them, I get a crazy number. Please Help. Thanks in advance.