出现错误如下:
Exception in thread "main" java.beans.IntrospectionException: Method not found: isLisi
at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:106)
at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:70)
at techAct5.IntrospectorTest.setProperty(IntrospectorTest.java:32)
at techAct5.IntrospectorTest.main(IntrospectorTest.java:19)
求指导 作者: 万马奔腾 时间: 2014-5-31 18:58
已解决
将
public static void main(String[] args) throws Exception {
User user = new User("zhangsan");
String uName = "lisi";
setProperty(user,uName);
}
中的String uName = "lisi";改为String uName = "name";