mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-07-28 12:22:17 +08:00
Compare commits
2 Commits
8adefc8b20
...
4a5e20b794
Author | SHA1 | Date | |
---|---|---|---|
|
4a5e20b794 | ||
|
aa8309167f |
@ -665,7 +665,7 @@ private static long sum() {
|
||||
```java
|
||||
float a = 2.0f - 1.9f;
|
||||
float b = 1.8f - 1.7f;
|
||||
System.out.println(a);// 0.100000024
|
||||
System.out.printf("%.9f",a);// 0.100000024
|
||||
System.out.println(b);// 0.099999905
|
||||
System.out.println(a == b);// false
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user