首页 > 其他分享 >Long.getLong得到的数据为NULL

Long.getLong得到的数据为NULL

时间:2023-03-01 09:45:48浏览次数:34  
标签:getLong Long str 字符串 NULL 属性

getLong(String str )是将系统属性的字符串转为Long 类型数据
如果你不是一个系统属性,比如一个“12”字符串,使用这个方法就会返回null

根据string获取对应的Long值应该用:Long.parseLong(str) 或者valueOf()

标签:getLong,Long,str,字符串,NULL,属性
From: https://www.cnblogs.com/Mr-jie3/p/17166889.html

相关文章