Long.getLong(String)
来源:互联网 发布:网络维护要什么证件 编辑:程序博客网 时间:2024/06/06 08:44
区分下
Long.getLong
和
Long.parseLong
二者的JavaDoc如下:
getLong的:取系统参数的~
Determines the long
value of the system property with the specified name.
The first argument is treated as the name of a system property. System properties are accessible through thejava.lang.System.getProperty(java.lang.String)
method. The string value of this property is then interpreted as along
value and a Long
object representing this value is returned. Details of possible numeric formats can be found with the definition ofgetProperty
.
If there is no property with the specified name, if the specified name is empty ornull
, or if the property does not have the correct numeric format, thennull
is returned.
parseLong的:真正把字符串解析成为Long对象的,如果格式错误则抛出NumberFormat异常!
Parses the string argument as a signed decimal long
. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign'-'
(\u002D'
) to indicate a negative value. The resultinglong
value is returned, exactly as if the argument and the radix 10
were given as arguments to the parseLong(java.lang.String, int)
method.
Note that neither the character L
('\u004C'
) nor l
('\u006C'
) is permitted to appear at the end of the string as a type indicator, as would be permitted in Java programming language source code.
- Long.getLong(String)
- 解决java的Long.getLong(str)的NullPointerException错误
- getopt------------------getlong
- C++ string转换long long
- Long.ValueOf(“String”) Long.parseLong(“String”) 区别
- Long.ValueOf(“String”) Long.parseLong(“String”) 区别
- long string date转换
- Date long String 转换
- object-->string-->long
- Hibernate.String/LONG 代替
- string[]转list<long>
- logcat truncate long string
- long-->Date-->String
- Java:String 转 long
- A Very Long String
- string、long、bigdecimal
- Java long 转成 String
- Java String 转 long
- poj 1679 The Unique MST 【次小生成树】
- 《c++ primer》第7章 类 学习笔记
- POJ 2773 HAPPY 2006
- 如何将double型数值转换为16进制的形式
- Linux的cat more less 命令的区别
- Long.getLong(String)
- Eclipse不显示已关闭的工程
- UITableView重要点整理
- 获取本机正在使用的网卡的MAC地址
- 浅谈线程池
- [poj1258 Agri-Net]最小生成树
- 九九乘法表
- Android中下载图片展示到界面点击放大
- 运输问题基本解 最小元素法