1、Long.ValueOf(“String”)返回Long包装类型数据
包装类型:Byte,Integer,Short,Long,Boolean,Character,Float,Double等。...2、Long.parseLong(“String”)返回long基本数据类型
基本数据类型:byte,int,short,long,boolean,char,float,double等。...比如:String s =”1234567899876543210000″,超过19位,就会报错,java.lang.NumberFormatException....String s = “12345698798765432100”,不超过就不会包错。...原因是Long类型的最大值位Long.MAX_VALUE = 9223372036854775807,大于错,最小值位Long.MIN_VALUE = -9223372036854775808,小于这个值也会报错