try convert string to int java code example
Example 1: string to int java
int result = Integer.parseInt(number);
Example 2: how to convert an string to an int using try
try:
fx = float(x)
fy = float(y)
except:
print ("Invalid input")
int result = Integer.parseInt(number);
try:
fx = float(x)
fy = float(y)
except:
print ("Invalid input")