Categories
How can a String type be converted to int?
Hello everyone, let's assume that a String type variable contains a string - "20". How can this value be overwritten into an int variable ? Is there any generic algorithm or keyword?
Answer the question
In order to leave comments, you need to log in
Integer x = Integer.valueOf(str); or int y = Integer.parseInt(str);
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question