Convert int to String and String to int in JAVA

To convert any String to int in Java there is a single line method

int intValue = Integer.valueOf("200");

To convert any int to String we can use

String stringValue = Integer.toString(200);

This is the simplest way to convert any int to String and String to int.

Leave a Reply