I am trying to write something like 1 + 1 in the edit text by pressing the app buttons and in converting the intgers to string in order to have them beside the rest of the intger ex: 11 not 1+1 (=2) i am getting error "FATAL EXCEPTION" with this line of code when pressing any number button
N[ii] = Integer.parseInt(stringNumber);
also error "FATAL EXCEPTION" in displayCalculations methode on pressing on the Sins x,+,- buttons
private void insertOrCheckNumber() {
if (End == 0) {
ii++;
} else if (u == 0) {
N = new int[ii];
stringNumber = stringNumber + String.valueOf(num);
displayCalculations(stringNumber);
N[ii] = Integer.parseInt(stringNumber);
}
if (u == 1) {
Sins = new String[iii];
displayCalculations(Sins[iii]);
}
}
private void clickNumber(int cN) {
u = 0;
num = cN;
insertOrCheckNumber();
}
private void displayCalculations(String txt) {
Calcs = String.valueOf(showCalcs.getText());
showCalcs.setText(Calcs + " " + txt);
}