Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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
Source by beginnersbook.com #
 
PREVIOUS NEXT
Tagged: #java #string #long
ADD COMMENT
Topic
Name
9+5 =