上一页 1 2 3 4 5 6 7 8 9 10 ··· 42 下一页
摘要: package com.taobao.study; public class ChaiDemo { public static void main(String[] args) { Integer a = 100; // 自动装箱 int b = a +1; // 自动拆箱 System.out.p 阅读全文
posted @ 2022-11-03 22:20 竹石2020 阅读(26) 评论(0) 推荐(0)
摘要: package com.te.jdkapi; import java.util.Scanner; /* 验证身份证的号码 */ public class PersonDemo { public static void main(String[] args) { Scanner sc =new Sca 阅读全文
posted @ 2022-11-03 20:20 竹石2020 阅读(24) 评论(0) 推荐(0)
摘要: package com.te.jdkapi; public class TestString { public static void main(String[] args) { test(); test2(); } public static void test(){ String st = "h 阅读全文
posted @ 2022-11-03 19:22 竹石2020 阅读(83) 评论(0) 推荐(0)
摘要: package com.te.jdkapi; import java.util.Arrays; public class StringDemo { public static void main(String[] args) { String name = new String("caihengai 阅读全文
posted @ 2022-11-03 12:59 竹石2020 阅读(31) 评论(0) 推荐(0)
摘要: package com.te.jdkapi; /* 字符串不可变。一经初始化就不会改变 */ public class Study_String { public static void main(String[] args) { String a = "123"; System.out.print 阅读全文
posted @ 2022-11-02 23:26 竹石2020 阅读(26) 评论(0) 推荐(0)
摘要: package com.te.jdkapi; import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput; import java.util.Objects; /* 学习equals的方法 */ public class Study_Equels 阅读全文
posted @ 2022-11-02 22:57 竹石2020 阅读(95) 评论(0) 推荐(0)
摘要: package com.te.exp; /** * finally 的使用 */ public class StudyExcep { public static void main(String[] args) { try { int[] arr = new int[3]; arr[3] = 100 阅读全文
posted @ 2022-11-02 20:49 竹石2020 阅读(27) 评论(0) 推荐(0)
摘要: package com.te.exp; /** * 此类用于学习异常 * 异常处理方法 * 1.虚拟机默认处理 * 将异常的名称(类型)异常出现的原因 以及异常出现的位置输出到控制台 * 2.程序员手动处理 * 有两种方案 * 1.try....catch...(捕获异常) * try...catc 阅读全文
posted @ 2022-11-02 20:18 竹石2020 阅读(48) 评论(0) 推荐(0)
摘要: 总结,接口可以在一个类继承别的父类后,如果父类不满足当前的需求,可以通过接口的形式添加方法,进行功能的扩充 public class Inter_Demo { public static void main(String[] args) { Dog a1 = new Dog(); a1.eat(); 阅读全文
posted @ 2022-11-02 19:24 竹石2020 阅读(32) 评论(0) 推荐(0)
摘要: /** * 接口是一种特殊的抽象类,该类型只能存在常量和抽象方法,而不存在变量和具体方法 * jdk1.8之前只能声明抽象方法,1.8之后可以声明具体方法 * 定义接口时,需要使用interface关键字 * 2.定义接口的格式 * [public abstract] interface 接口名称{ 阅读全文
posted @ 2022-11-01 22:39 竹石2020 阅读(36) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 42 下一页