parseFloat
java.lang
Class Float
java.lang.Object
|
+-java.lang.Number
|
+-java.lang.FloatAll Implemented Interfaces:
Comparable, Serializable public static float parseFloat(String s)
throws NumberFormatException
Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Float. Parameters:
s - the string to be parsed.
Returns:
the float value represented by the string argument.
Throws:
NumberFormatException - if the string does not contain a parsable float.
Since:
1.2
See Also:
valueOf(String)
java.lang
Class Float
java.lang.Object
|
+-java.lang.Number
|
+-java.lang.FloatAll Implemented Interfaces:
Comparable, Serializable public static float parseFloat(String s)
throws NumberFormatException
Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Float. Parameters:
s - the string to be parsed.
Returns:
the float value represented by the string argument.
Throws:
NumberFormatException - if the string does not contain a parsable float.
Since:
1.2
See Also:
valueOf(String)
解决方案 »
- java程序中,能被一个数整除是用"%"还是"/"?
- 各位我编的一个JAVA文件在运行的时候出现"javaapplication2.NewClass@35ce36"请问如何解释?????
- 强制转换和调用toString()有什么区别???谢谢!!
- synchronized能修饰什么?修饰了以后代表什么意思?
- JAVA 语法 菜鸟求指导
- 请教Borland JBuilder8一个run project的问题
- java执行操作系统命令的问题:如何判断多个操作系统?
- 捡分大好时机,比较C++和Java这两种语言
- 关于JOptionPane国际化问题!
- Java中如何生成可通过双击打开的应用程序?
- java 路线,燃眉之急
- i want to learn Java !
Class Integer
java.lang.Object
|
+-java.lang.Number
|
+-java.lang.IntegerAll Implemented Interfaces:
Comparable, Serializable
parseInt
public static int parseInt(String s)
throws NumberFormatException
Parses the string argument as a signed decimal integer. 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 resulting integer value is returned, exactly as if the argument and the radix 10 were given as arguments to the parseInt(java.lang.String, int) method. Parameters:
s - a String containing the int representation to be parsed
Returns:
the integer value represented by the argument in decimal.
Throws:
NumberFormatException - if the string does not contain a parsable integer.