自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 折半查找并插入(在一个有序数组中通过二分查找数字,若存在,指出其是数组中第几个元素;反之插入数组并有序化)

import java.util.Arrays;import java.util.Scanner;/** * 折半查找(二分查找):从中间找(数组默认排好序了) * @author Family happy Lee * */public class 折半查找并插入 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int[] a = {12,24,35,8.

2021-09-24 17:07:35 128

原创 数组的创建与实例化

package 数组combine构造方法;public class Array { public static void main(String[] args) {/* int[] array1 = null; array1= new int[10]; */ //一维数组的创建 User[] user = null; //栈中声明数组(在栈里生成实例化数组user并定义为空) user =new User[3]; //堆内分配空间(堆里创建一个空间大小为3的实例化数.

2021-09-04 14:49:46 226

原创 递归求10的阶乘

/** * 10!=10*9*8*...*1 * @author Family happy Li * */public class 十的阶乘 { public static void main(String args[]) { System.out.println(factorial(10)); } static long factorial(int n) { if(n==1) { return 1; /.

2021-08-20 11:35:31 442

原创 对象和类™

public class 粉兔叽 { void 匹配() { System.out.println("匹配模式"); } void 排位() { System.out.println("排位模式"); } void 极地大乱斗() { System.out.println("极地大乱斗"); } public static void main(String args[]) { 粉兔叽 LOL = new 粉兔叽(); LOL.匹配(); LOL.排位(); LOL.

2021-08-20 11:28:47 75

原创 Test all various of arithmetic operator

Test all various of arithmetic operator,including Self-increasing,Self-decreasing,Assignment and assignment extension operators,relational operator, logical operator and positional operator as well as shift operation./** * 测试算术运算符 * @author Family hap

2021-08-11 12:34:33 115

空空如也

空空如也

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

TA关注的人

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