本帖最后由 oath 于 2013-8-8 12:43 编辑
- import org.apache.commons.beanutils.BeanUtils;
- class Student{
- private int age=20;
- public int getAge() {
- return age;
- }
- public void setAge(int age) {
- this.age = age;
- }
- }
- class Introspection_BeanUtils {
- public static void main(String[] args) throws Exception{
- Student p=new Student();
- BeanUtils.getArrayProperty(p,"age");
- }
- }
复制代码
Student类中明明有set get方法 ,哪里出错了 ?
|