siyuliu  

2025年11月12日

摘要: ![image](https://img2024.cnblogs.com/blog/3441892/202511/3441892-20251112115544910-1442128147.png) ![image](https://img2024.cnblogs.com/blog/3441892/202511/3441892-20251112115558296-203998385.png) ![i 阅读全文
posted @ 2025-11-12 12:01 nnnnnnunn 阅读(3) 评论(0) 推荐(0)
 
摘要: try catch处理异常 public class Main { public static void main(String[] args) { int a=1; int b=0; try{ System.out.println(a/b); } catch(Throwable e){//想要捕获 阅读全文
posted @ 2025-11-12 10:48 nnnnnnunn 阅读(4) 评论(0) 推荐(0)
 
摘要: 类内类 方法内类(局部内部类) 阅读全文
posted @ 2025-11-12 10:06 nnnnnnunn 阅读(4) 评论(0) 推荐(0)
 
摘要: stu接口 public class teacher extends stu{ public void say() { System.out.println("teacher"); } } teacher类实现接口 public class teacher implements stu,接口n{ / 阅读全文
posted @ 2025-11-12 09:56 nnnnnnunn 阅读(3) 评论(0) 推荐(0)
 
摘要: stu.java(抽象类不能new,只能靠子类去实现) public abstract class stu { public abstract void say(); } 阅读全文
posted @ 2025-11-12 09:39 nnnnnnunn 阅读(5) 评论(0) 推荐(0)