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

🧠 10 Powerful ChatGPT Use Cases to Supercharge Your Business in 2025

  🧠 10 Powerful ChatGPT Use Cases to Supercharge Your Business in 2025 In today’s fast-paced digital world, businesses are racing to adopt ...