int i = 10;
double j=1.0;
String str_i=Integer.toString(i);
String str_j = Double.toString(j);double dd = Double.valueOf("123.2");
double j=1.0;
String str_i=Integer.toString(i);
String str_j = Double.toString(j);double dd = Double.valueOf("123.2");
int i=10;
String str=Integer.toString(i);
double 转化成String:
double d=10.0;
String str=Double.toString(d);
String 转化成double:
String str="123456";
double d=Double.valueOf(str).doubleValue();
double dd = Double.parseDouble("123.2");
int a = 12;
double b = 122;
String s1 = a + "";
String s2 = b + ""; System.out.println("s1 and s2: "+s1+" "+s2); String s = "12345";
try{
double d = (new Double(s)).doubleValue();
System.out.println("d: "+d);
}
catch(NumberFormatException e){
System.out.println("s is not a number");
}
}
}
顺便问一下,你们熟悉各种control和Variant, safeArray和我联络icq: 36352861 (不是QQ)
MSN Message: [email protected]
I am online now.
ungerent