选择题
C C BC D C B A A
编程题
public class Test3 {
public static void main ( String[ ] args) {
int score= 100 ;
Integer score1= new Integer ( score) ;
double score2= score1;
long score3= score1;
int score4= score1;
System. out. println ( score2) ;
System. out. println ( score3) ;
System. out. println ( score4) ;
}
public class Test3 {
public static void main ( String[ ] args) {
double a= 12.5 ;
String str1= a+ "10" ;
System. out. println ( "a 转换为String型后+10的结果为: " + str1) ;
String str= "2.8" ;
double b= Double. parseDouble ( str) + 10 ;
System. out. println ( "str 转换为double型后+10的结果为: " + b) ;
}
public class Test3 {
public static void main ( String[ ] args) {
float f1= 88.99f ;
String f1ToString= f1+ "20" ;
System. out. println ( "f1 转换为String型后+20的结果为: " + f1ToString) ;
String str2= "188.55" ;
System. out. println ( "str2 转换为double型后+20的结果为: " + ( Double. parseDouble ( str2) + 20 ) ) ;
}