I have a basic ish knowledge of java and I am currently making a calculator using the Java programming language. I have thought to make a string variable for the number inputs so when the user keeps pressing '1' the string makes up a string of 1's. I see this as the best way.
The problem is that when I come to add the numbers up I see that I have to convert the string to an integer or other number based variable. I have tried the following method, it seems to work and puts the value in the integer but I can't seem to add the itegers up. I have stripped the code down a lot to make it a lot more simpler to understand.
Thanks for any help in advanced.
import java.awt.*; import java.applet.Applet; import java.awt.event.*; public class calcv2 extends Applet{
String tempnumber="111"; int numstorea=1; int numstoreb=2;