1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
/* int to String Example This int to String java example shows how to convert int to String in Java. */ public class StringToIntJavaExample { public static void main(String args[]){ //int variable int i = 11; /* * To convert int to String, use * toString(int i) * method of Integer wrapper class. */ String str = Integer.toString(i); System.out.println("int to String : " + str); } } /* Output of int to String example would be int to String : 11 */ |
give me a problem and codes using if else statement
please give me more examples