I want to multiply two String variables and want to store the answer in a new variable. How can I do this?
I have already tried to do the simple:
String t2 = t1 * m1;
The error was that *
was undefined. So, I tried adding:
import java.math.'whatever';
That didn't fix the error.
use
String t2 = String.valueOf(Integer.parseInt(t1) * Integer.parseInt(m1))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With