To convert Integer into String in Java, we can use toString() method in Integer class instance :
1 2 | Integer hello = 1; String convert = Integer.toString(hello); |
Then, to convert String into Integer, we can use parseInt() method in Integer class instance:
1 2 | String hello = "1"; Integer convert = Integer.parseInt(hello); |
Easy! 🙂