I\'m trying to convert a String variable into an integer, only the String looks like this (for example):
String string = \" 12\";
And so the St
Would .trim work? And if so, how would I use that?
Yes, trim() will work, it will remove leading and trailing spaces from String,
trim()
String
int integer = Integer.parseInt(string.trim());