这样怎么就不行呢?
double m = 78.5;
//将基本类型转换为字符串
String str1 =String.valueOf(m);
System.out.println("m 转换为String型后与整数20的求和结果为: "+(str1+20));
String str = "180.20";
Double a =Double.valueOf(str);
System.out.println("str 转换为double型后与整数20的求和结果为: "+(a+20));
}
}