There is a simple condition, we enter one number (in EditText), then the second, they are multiplied together, the result is displayed in Toast. But how to push a condition only for integers? To enter numbers with tenths or negatives, a window is displayed, saying that you must enter an integer.
int i = Integer.parseInt(tv.getText().toString()); int i1 = Integer.parseInt(tv1.getText().toString()); int res = i*i1;