Tuesday, December 03, 2013

Converting Strings to int and int to String


int i = 2 ;
String a = String.valueOf(i);   //integer to numeric string
int j = Integer.parseInt(a); //numeric string to an int

No comments:

Post a Comment

How to build an AI Agent

  Agents are the most valuable skill in AI and product right now. So why not build one? Here's how: 𝐒𝐭𝐞𝐩 𝟏: 𝐃𝐞𝐟𝐢𝐧𝐞 𝐚 𝐬𝐲𝐬...