Double.valueOf容易出现的问题!

String a = "100";
String b = "100";
System.out.println(Double.valueOf(a)==Double.valueOf(b));//false
System.out.println(Double.parseDouble(a)==Double.parseDouble(b));//true



你可能感兴趣的:(笔记)