![]() ![]() The returned value for both expressions is a Java String that represents the integer “i” argument. The radix value is an optional parameter and if it is not set, for the decimal base system the default value is 10. radix: the used base – number system in order to represent the string.public static String toString(int i, int radix). ![]() There are two different expressions for Integer.toString() method: This approach, unlike the others, can return a NullPointerException. The Integer class has a static method that returns a String object representing the int parameter specified in the Integer.toString(int) function. How we convert int to String in Java? Integer to String conversion in Java: using Integer.toString(int)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |