1.原理: 2.代码实现: 1 /* 2 * insert:实现插入排序 3 * ary[ARRAY] 需要排序的数组 4 * @return 5 * [ARRAY] 排序后的新数组 6 * by js0205 7 */ 8 function insert(ary) { 9 let handle = ...
分类:
编程语言 时间:
2021-06-28 19:14:34
阅读次数:
0
一、基本使用 1、数组的创建 (1) 通过[] let arr1 = [1, 2, 3, 4, 5] (2) 通过创建构造函数 Array的实例 let arr2 = new Array(1, 2, 3, 4, 5) console.log(arr2) // [1, 2, 3, 4, 5] 需要注意 ...
分类:
编程语言 时间:
2021-06-28 19:11:58
阅读次数:
0
一、概要 本文主要分享在文件对象处理中需要根据文件名排序思路。主要基于.net框架内提供的IComparer对象,它主要将定义类型为比较两个对象而实现的方法。 二、详细内容 1.场景 在读取文件列表的时候,会遇到各种各样的文件名例如“xxx-01”,"1xx01-13"希望按照数字的大小进行排序;可 ...
分类:
编程语言 时间:
2021-06-28 19:07:26
阅读次数:
0
/* 指定考试成绩,判断成绩的等级。 90-100 优秀 80-89 好 70-79 良 60-69 及格 60以下 不及格 */ public class IfElsePractise{ public static void main(String[] args){ int score = 98; ...
分类:
其他好文 时间:
2021-06-28 19:00:36
阅读次数:
0
implementation 'org.greenrobot:eventbus:3.2.0' EventBus package com.qiqi.app.bean; public class EventMessageWrap { public final String message; public ...
分类:
其他好文 时间:
2021-06-28 18:59:05
阅读次数:
0
/*单if语句的格式: if(关系表达式){ 语句体; } */ public class SeguenceIf{ public static void main(String [] args){ System.out.println("今天天气不错,正在压马路,突然发现一个好玩的地方:网吧"); ...
分类:
其他好文 时间:
2021-06-28 18:55:48
阅读次数:
0
方法的重载 public class MethodDemo05 { public static void main(String[] args) { int add1 = add(1, 2); System.out.println(add1); System.out.println(" "); in ...
分类:
其他好文 时间:
2021-06-28 18:55:14
阅读次数:
0
可变参数 实际上参数是数组 public class MethodDemo07 { public static void main(String[] args) { MethodDemo07 demo07 = new MethodDemo07(); demo07.test(1,2,3,4,5,6,7 ...
分类:
其他好文 时间:
2021-06-28 18:53:22
阅读次数:
0
递归 public class MethodDemo09 { //2! 2*1 //3! 3*2*1 //5! 5*4*3*2*1 public static void main(String[] args) { MethodDemo09 demo09 = new MethodDemo09(); i ...
分类:
其他好文 时间:
2021-06-28 18:52:21
阅读次数:
0
案例 public class MethodDemo11 { public static void main(String[] args) { judge(); } //加法 public static double add(double x,double y) { return x + y; } ...
分类:
其他好文 时间:
2021-06-28 18:50:17
阅读次数:
0