菜鸟撸java
qqxzxx
这个作者很懒,什么都没留下…
展开
-
查找数组中最小值和最大值
public static void main(String[] args) { arr = new int[]{10,2,3,-1,109,6,7,0,9,99}; //查找数组中元素的最大值和最小值 //定义最小值下标 int minIndex = 0; //定义最大值下标 int maxIndex = 0; for (int i = 0; i < arr.length; ..原创 2021-08-21 10:17:14 · 406 阅读 · 0 评论 -
java实现三分钟倒计时
/**倒计时3分钟 * 03:00 * 02:59 * ... * 00:01*/ public class Countdown { public static void main(String[] args) throws InterruptedException { //创建Date日期对象 Date date = new Date(); //创建日期格式化对象 SimpleDateFormat sdf = new S.原创 2021-08-20 19:56:00 · 617 阅读 · 0 评论