cast long to string java
long longV = 1L;
System.out.println(String.valueOf(longV));
cast long to string java
long longV = 1L;
System.out.println(String.valueOf(longV));
java string to long
public class Example {
public static void main(String[] args)
{
String str = "10000";
String str2 = "22222";
//Conversion using Long(String s) constructor
long num = new Long(str);
long num2 = new Long(str2);
System.out.println(num*num2);
}
}
Output:
222220000
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