I have this:
For Example:
codincidenceSelected.id –> have value “1”
int one –> have value “1”
When i sum this integer and string it gives me “Incidence: 11”, but I want “Incidence: 2”, so my code it isn’t summing, it is adding the value of the integer.
Here is my code:
CodIncidence codIncidenceSelected = new CodIncidence();
app = (netAppApplication)getApplicationContext();
codIncidenceSelected = app.getcodincidenceActual();
int one = 1;
String total = codIncidenceSelected.id + one;
Toast toast=Toast.makeText(this, "Incidence: " + total, 5000);
toast.show();
1 Answer