I am practicing variable changes in Java using Eclipse and a little doubt has arisen. If I want to change a variable of type String to another variable of integer type (int), which of the two forms is correct or adequate for do it?
int variable = Integer.parseInt(variableString);
or
int variable = Integer.valueOf(variableString);