摘要:
public static int queryStr(String str , String regex) { //计数 int count; //判断是否包含目标字符串 if (!str.contains(regex)) return 0; //以regex分割成为数组,以测试开头能正常,结尾不正 阅读全文
posted @ 2021-01-15 22:00
多米_dmxq#top
阅读(209)
评论(0)
推荐(0)
摘要:
/** * * @param str * @return */ public static boolean symString(String str) { //获取str长度 int len = str.length(); if(len<1) return false; // int tail = 阅读全文
posted @ 2021-01-15 21:57
多米_dmxq#top
阅读(1277)
评论(0)
推荐(0)
摘要:
异常 子类重写父类发生异常 子类可以抛出运行时异常 子类不能抛出比父类更多的异常,父类没有抛出异常,子类也不能抛出异常。 如果在多态中: 父类抛出运行时异常,子类重写抛出编译时异常, 由于编译看左边,所以不会报错,但是运行看右边,实际运行中会操作 throw 不满足于在方法声明中抛出异常,需要在主动 阅读全文
posted @ 2021-01-15 15:13
多米_dmxq#top
阅读(96)
评论(0)
推荐(0)
浙公网安备 33010602011771号