当前位置:网站首页>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); 取中最小值
边栏推荐
- 深度学习100例 —— 卷积神经网络(CNN)实现mnist手写数字识别
- Challenge LeetCode1000 questions in 365 days - Day 047 Design Circular Queue Circular Queue
- After 21 years of graduation, I switched to software testing. From 0 income to a monthly salary of over 10,000, I am really lucky...
- LeetCode每日一练 —— 20. 有效的括号
- ssm网页访问数据库数据报错
- LayaBox---TypeScript---Mixins
- Shell编程之条件语句
- How to technically ensure the quality of LED display?
- FPGA手撕代码——CRC校验码的多种Verilog实现方式 (2021乐鑫科技数字IC提前批代码编程)
- 情景剧《重走长征路》上演
猜你喜欢

通过方法引用获取方法名

4年手工测试被应届生取代了,用血与泪的教训给xdm一个忠告,该学自动化了...

Challenge LeetCode1000 questions in 365 days - Day 047 Design Circular Queue Circular Queue

STM32+MPU6050设计便携式Mini桌面时钟(自动调整时间显示方向)

MySQL模糊查询性能优化

10份重磅报告 — 展望中国数字经济未来

LeetCode每日一练 —— 20. 有效的括号

Breaking the Boundary, Huawei's Storage Journey

AlphaFold又放大招,剑指整个生物界!

Multithreading (Basic) - 40,000 word summary
随机推荐
如何封装微信小程序的 wx.request() 请求
一体化在线政务服务平台,小程序容器技术加速建设步伐
LayaBox---TypeScript---Mixins
5G基础学习1、5G网络架构、网络接口及协议栈
Com多进程通信实现
STM32+MPU6050 Design Portable Mini Desktop Clock (Automatically Adjust Time Display Direction)
学习笔记-支付宝支付
Question about #oracle#, how to solve it?
腾讯云云函数SCF—入门须知
Shell编程之条件语句
有奖征集|TaoCloud&宝德联合举办全闪POC!
FPGA手撕代码——CRC校验码的多种Verilog实现方式 (2021乐鑫科技数字IC提前批代码编程)
C#/VB.NET to add more lines more columns image watermark into the Word document
LayaBox---TypeScript---三斜线指令
3 d laser slam: LeGO - LOAM - ground point extracting method and the analysis of the code
LayaBox---TypeScript---模块
【术语科普】关于集成工作台那些难懂的词儿,看这篇秒懂!
C#为listview选中的项添加右键菜单
字节跳动软件测试岗,收到offer后我却拒绝了~给面试的人一些忠告....
Several reasons why applet plugins benefit developers