上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
摘要: 1 public class Demo13{ 2 3 4 /*Java规定: 5 1.必须捕获的异常,包括Exception及其子类,但不包括RuntimeException及其子类,这种类型的异常称为Checked Exception。 6 7 2.不需要捕获的异常,包括Error及其子类,Run 阅读全文
posted @ 2020-12-28 14:09 dog_IT 阅读(68) 评论(0) 推荐(0)
摘要: 1 import java.util.*; 2 public class Demo13{ 3 4 5 /*Java规定: 6 1.必须捕获的异常,包括Exception及其子类,但不包括RuntimeException及其子类,这种类型的异常称为Checked Exception。 7 8 2.不需 阅读全文
posted @ 2020-12-27 17:03 dog_IT 阅读(50) 评论(0) 推荐(0)
摘要: 1 import java.util.*; 2 public class Demo13{ 3 4 5 public static void main(String[] args) { 6 7 Weekday day = Weekday.SUN; 8 9 //将enum类型用于switch语句 10 阅读全文
posted @ 2020-12-27 11:44 dog_IT 阅读(549) 评论(0) 推荐(0)
摘要: 1 public class ArrayExer3 { 2 public static void main(String[] args) { 3 //二分法查找前提:元素值是有序的 4 int[] arr = {-54,-36,-18,0,15,36,69,109,188,333}; 5 6 //查 阅读全文
posted @ 2020-12-27 00:39 dog_IT 阅读(204) 评论(0) 推荐(0)
摘要: 1 import java.util.Arrays; 2 3 public class ArrayExer2 { 4 public static void main(String[] args) { 5 String[] arr = {"李苗","李大雪","鄢立文","李文娇","李娅芳"}; 6 阅读全文
posted @ 2020-12-26 23:56 dog_IT 阅读(143) 评论(0) 推荐(0)
摘要: 1 import java.util.Arrays; 2 3 public class ArrayExer { 4 public static void main(String[] args) { 5 String[] arr = {"李苗","李大雪","鄢立文","李文娇","李娅芳"}; 6 阅读全文
posted @ 2020-12-26 23:37 dog_IT 阅读(103) 评论(0) 推荐(0)
摘要: 1 import java.util.*; 2 public class Demo13{ 3 public static void main(String[] args) { 4 Weekday day = Weekday.SUN; 5 //int day = 1; 6 if(day.dayValu 阅读全文
posted @ 2020-12-26 21:58 dog_IT 阅读(99) 评论(0) 推荐(0)
摘要: `import java.util.Arrays; public class ArrayExer2 { public static void main(String[] args) { int[] arr = new int[10]; int sum = 0; for (int i = 0; i < 阅读全文
posted @ 2020-12-24 18:51 dog_IT 阅读(821) 评论(0) 推荐(0)
摘要: `import java.util.*; public class Demo13{ public static void main(String[] args) { int[] arr = new int[6]; outer:for(int i=0;i<arr.length;i++){ //先赋值一 阅读全文
posted @ 2020-12-24 17:15 dog_IT 阅读(104) 评论(0) 推荐(0)
摘要: ` public class YanghuiTest3 { public static void main(String[] args) { //动态初始化一个10行的二维数组 int[][] yh = new int[10][]; for (int i = 0; i < yh.length; i+ 阅读全文
posted @ 2020-12-24 16:11 dog_IT 阅读(66) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页