change from string to int in java code example
Example 1: convert string to int java
String myString = "1234";
int foo = Integer.parseInt(myString);
Example 2: convert a string into an integer
var text = '42px';
var integer = parseInt(text, 10);
// returns 42