Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ pulic Integer getMaxValue(List valueList){

```
//在您自己的READ.md中,答案写到下面的位置

public Integer getMaxValue(List valueList){
return (Integer) Collections.max(valueList);
}

//这样做的原因写到下面

collections类是集合的工具类,里面有大量的方法可以操作集合,Collections.max()方法可以获取集合中的最大值;
此公用函数有局限性,它的数据类型是包装类Integer,所以只针对int类型,对其他数据类型不适用。

```