Skip to content

Commit b94f831

Browse files
author
chenyong
committed
docs(java): add tip about java bigdecimal equals and compareTo
1 parent 6f4b02e commit b94f831

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

java/basic/java-basic.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,4 +1578,7 @@ https://www.ibm.com/developerworks/cn/java/j-lo-javaio/index.html
15781578

15791579
## 面试题
15801580
* Integer和int的区别
1581-
* String a = new String("abc");共创建了几个对象
1581+
* String a = new String("abc");共创建了几个对象
1582+
1583+
## 注意点
1584+
1. BigDecimal比较值,不要使用equals,因为0和0.00比较equals会判断false,要使用compareTo()。Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in value but have a different scale (like 2.0 and 2.00) are considered equal by this method.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 分布式事务
2+
3+
### Seata
4+
https://www.oschina.net/p/seata?hmsr=aladdin1e1
5+
http://www.dreamwu.com/post-1741.html
6+
https://blog.csdn.net/hosaos/article/details/89136666

0 commit comments

Comments
 (0)