当前位置:网站首页>List排序 ,取最大值最小值
List排序 ,取最大值最小值
2022-08-02 11:08:00 【左--右】
List排序 ,取最大值最小值
public static void main(String[] args) {
List list = Arrays.asList(5,2,3,1,9);
int N = list.size();
int t = 0;
Collections.sort(list);
System.out.println("顺序--"+list);
Collections.reverse(list);
System.out.println("倒叙--"+list);
Collections.shuffle(list);
System.out.println("随机--"+list);
}
Integer max = Collections.max(iList); 取中最大值
Integer max = Collections.min(iList); 取中最小值
边栏推荐
- 从测试入门到测试架构师,这10年,他是这样让自己成才的
- 一体化在线政务服务平台,小程序容器技术加速建设步伐
- Mysql事务隔离级别与MVCC(多版本并发控制)
- Oracle查询提示 ORA-00933 SQL command not properly ended 原因排查
- LayaBox---TypeScript---Module Analysis
- Deep Learning 100 Examples - Convolutional Neural Network (CNN) for mnist handwritten digit recognition
- 5G基础学习1、5G网络架构、网络接口及协议栈
- 从零开始Blazor Server(5)--权限验证
- ECCV22|PromptDet:无需手动标注,迈向开放词汇的目标检测
- 多线程(基础) - 4万字总结
猜你喜欢
随机推荐
Getting Started with Three.JS Programmatic Modeling
STM32+MPU6050设计便携式Mini桌面时钟(自动调整时间显示方向)
从众多接口中脱颖而出的最稳定的接口——淘宝详情api
sva assertion data
划分训练集,验证集,测试集
循环结构--do-while循环
What is the future of smartwatches?
有奖征集|TaoCloud&宝德联合举办全闪POC!
SVN如何删除文件名包含空格的文件
5G网络切片技术
QT笔记——在一个窗口上显示另外一个透明窗口
多线程(基础) - 4万字总结
阿里CTO程立:阿里巴巴开源的历程、理念和实践
流动性质押挖矿系统开发如何制作?单双币系统开发成熟技术
LayaBox---TypeScript---Three slash instructions
Hub and Spoke配置案例
Camera Hal OEM模块 ---- cmr_snapshot.c
LayaBox---TypeScript---JSX
【2022 小目标检测综述】Towards Large-Scale Small Object Detection: Survey and Benchmarks
idea常用插件