File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
src/main/java/com/cpucode/mathNum/compareTest Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1212- [x] [ 加法] ( src/main/java/com/cpucode/mathNum/addTest/AddTest.java )
1313- [x] [ 算术类型] ( src/main/java/com/cpucode/mathNum/mathTest/MathTest.java )
1414- [x] [ 转换为各类型] ( src/main/java/com/cpucode/mathNum/valueTest/ValueTest.java )
15-
15+ - [x] [ 将number对象与参数比较 ] ( src/main/java/com/cpucode/mathNum/compareTest/CompareTest.java )
1616
1717- [ 返回目录] ( ../README.md )
Original file line number Diff line number Diff line change 1+ package com .cpucode .mathNum .compareTest ;
2+
3+ /**
4+ * 将number对象与参数比较
5+ *
6+ * @author : cpucode
7+ * @date : 2021/12/21 8:51
8+ * @github : https://github.com/CPU-Code
9+ * @csdn : https://blog.csdn.net/qq_44226094
10+ */
11+ public class CompareTest {
12+ public static void main (String [] args ) {
13+ Integer x = 5 ;
14+
15+ System .out .println (x .compareTo (3 ));
16+ System .out .println (x .compareTo (5 ));
17+ System .out .println (x .compareTo (8 ));
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments