java学习
TGAO
这个作者很懒,什么都没留下…
展开
-
java异常处理
public class TestSystemException1{ public static void main(String args[]){ int a=0,b=5; try{ System.out.println(b/a); }//以零为除数,引发系统定义的算术异常 catch(Exception e){ //catch块捕获异常 Syste...原创 2018-10-28 22:12:44 · 173 阅读 · 0 评论 -
Java内部类与匿名类
interface Aa{ void say();}class XueHao implements Aa{ public void say(){ System.out.println("hello world"); }}public class Test{ public static void main(String args[]){ Aa aa; aa=new Xu...原创 2018-11-09 20:38:08 · 130 阅读 · 0 评论