📜  字符串转长 java 代码示例

📅  最后修改于: 2022-03-11 14:52:06.284000             🧑  作者: Mango

代码示例3
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