如果将以下数据类型转换为Double
(.equals()
测试)或double
(==
测试),相等测试的准确性是多少?
Long
long
Integer
int
如果等式检验仅在可能的Long
、或值范围内准确long
,那么该准确度的准确范围是多少?Integer
int
例如;
Long longTest = Long.MAX_VALUE;
Long longTest2 = Long.MAX_VALUE;
double doubleTest = (double) longTest;
double doubleTest2 = (double) longTest2;
if(doubleTest == doubleTest2) //Is this accurate?
return true;