随笔分类 -  面试

摘要:使用迭代器遍历ArrayList并尝试删除数据: public class CollectionApp { public static void main(String[] args) { List<Integer> list = new ArrayList<>(); list.add(0); li 阅读全文
posted @ 2021-01-03 22:49 junlu 阅读(463) 评论(0) 推荐(0)
摘要:输出程序运行后的打印结果: class Father{ static { System.out.print("1"); } Father(){ System.out.print("3"); } } class Son extends Father{ static { System.out.print 阅读全文
posted @ 2021-01-02 14:42 junlu 阅读(69) 评论(0) 推荐(0)
摘要:遇到的一道面试笔试题,输出程序运行后的打印结果: class ReturnAndFinally{ static String fun(){ try { int v = 1/0; }catch (Exception ex){ return "ERROR"; }finally { return "OK" 阅读全文
posted @ 2021-01-02 14:36 junlu 阅读(80) 评论(0) 推荐(0)