简介C|ass与类别载人 string name caterpillar i Class stringclass =name getClass() System.out. print1n("类别名称:"+ stringClass. getName()) System.out. print1n("是否为接口:"+ stringclass. isInterface ())i System.out. println("是否为基本型态:"+ stringclass imPrimitive())i System.out. print1n("是否为数组对象:"+ stringclass. isArray() System.out. print1n("父类别名称:"+ stringclass. getSuperclass().getName())i Class stringclass String class简介Class与类别载入 String name = "caterpillar"; Class stringClass = name.getClass(); System.out.println("类别名称:" + stringClass.getName()); System.out.println("是否为接口:" + stringClass.isInterface()); System.out.println("是否为基本型态:" + stringClass.isPrimitive()); System.out.println("是否为数组对象:" + stringClass.isArray()); System.out.println("父类别名称:" + stringClass.getSuperclass().getName()); Class stringClass = String.class;