java how to cast int to String
int i = 1234;
String s = String.ValueOf(i)
java how to cast int to String
int i = 1234;
String s = String.ValueOf(i)
integer to string in java
class GfG
{
public static void main(String args[])
{
int a = 1234;
int b = -1234;
String str1 = Integer.toString(a);
String str2 = Integer.toString(b);
System.out.println("String str1 = " + str1);
System.out.println("String str2 = " + str2);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us