自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 查找数组中最小值和最大值

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 402

原创 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 616

原创 冒泡排序

/**冒泡排序*/ public class BubbleSort { public static void main(String[] args) { //定义交换变量 int swap = 0; //定义数组 int[] arrs = {9,1,3,12,34,78,15,25,2,8}; //外层控制循环趟数 for (int i = 0; i <arrs.length-1 ; i++) {.

2021-08-20 10:53:40 53

原创 随机获得字符串的下标数

自学java public static void main(String[] args) { String s = "asdfghhjjkk12345678"; for(int i = 0; i<s.length();i++) { Random random = new Random(); int index = random.nextInt(s.length()); ...

2021-08-19 13:12:08 151

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除