Skip to content

Commit c6c4d12

Browse files
author
chenyong
committed
docs(java): add tip about java string split
1 parent c7e0e50 commit c6c4d12

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

java/basic/java-basic.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,4 +1581,6 @@ https://www.ibm.com/developerworks/cn/java/j-lo-javaio/index.html
15811581
* String a = new String("abc");共创建了几个对象
15821582

15831583
## 注意点
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.
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.
1585+
1586+
2. String.split()在分割. |等时需要注意,因为split分割的时候使用了正则, 点需要使用\\.类处理,具体使用时百度下

0 commit comments

Comments
 (0)