![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA基础
元源0410
这个作者很懒,什么都没留下…
展开
-
方法——找出任意数组最大值并返回
package com.jy.demo; public class Test3 { public static void main(String[] args) { //新建方法,数组中找出任意数组最大值并返回 int[] ages={22,44,33,78,34}; int older= getArrayMaxData(ages); System.out.println(older); } public static原创 2022-04-09 11:07:05 · 469 阅读 · 0 评论 -
数组——冒泡法排序
冒泡法分析 1、总共需要做几轮:数组长度-1; 2、每轮比较几次:数组长度-比较轮数 package com.jy.demo; public class Test5 { public static void main(String[] args) { //1.先定义数组 int[] arr={5,3,2,1}; //2.定义循环,比较轮数 //比较轮数=数组长度-1 for (int i = 1; i < arr原创 2022-04-06 17:38:37 · 76 阅读 · 0 评论 -
数组——猜数字游戏
数组——猜数字游戏原创 2022-04-02 21:48:04 · 2381 阅读 · 0 评论