class Do1 { public static void main(String[] args) { AA a=new CC(); if(a instanceof CC) { CC b=(CC)a; b.run(); } } } class AA { int y=3; void brun() { System.out.println(y); } } class CC extends AA { int x=1; void run() { System.out.println(x); } } c…
java判断string变量是否是数字的六种方法小结 (2012-10-17 17:00:17) 转载▼ 标签: it 分类: 转发 1.用JAVA自带的函数 public static boolean isNumeric(String str){ for (int i = 0; i < str.length(); i++){ System.out.println(str.charAt(i)); if (!Character.isDigit(str.charAt(i))){ …