/*
来 自*
nowjava - 时 代 Java
*/
public class Main {
public static void main(String[] args) {
//create a Float object using one of the below given constructors
//1. Create an Float object from float primitive type
float f = 10.10f;
Float fObj1 = new Float(f);
System.out.println(fObj1);
//2. Create an Float object from double primitive type
double d = 10.10;
Float fObj2 = new Float(d);
System.out.println(fObj2);
/*
3. Create and Float object from String. method can
throw NumberFormatException if string doesnt contain parsable number.
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。