Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DuGuQiuBai/Java
/ compareTo
Method
compareTo
day18/code/day18_Collections/src/cn/itcast_02/Person.java:33–36 ·
view source on GitHub ↗
(Person p)
Source
from the content-addressed store, hash-verified
31
}
32
33
@Override
34
public
int
compareTo(Person p) {
35
return
this.age - p.age;
36
}
37
}
Callers
3
compare
Method · 0.45
compare
Method · 0.45
main
Method · 0.45
Calls
no outgoing calls
Tested by
1
compare
Method · 0.36