用instanceof来判断,某个对象是否是某个类的一个实例,如:String str="123"; if(str instanceof String){}
obj instanceof String
str.getClass()
可以用正则表达式