Answers for "parse long to string in java"

1

cast long to string java

long longV = 1L;
System.out.println(String.valueOf(longV));
Posted by: Guest on July-08-2021
1

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
Posted by: Guest on September-22-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language