反射例子希望对大家有帮助
//有数据的bean
package utilbeans;
public class UtilsBeansOne {
public UtilsBeansOne() {
}
public String getPassword() {
return password;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public void setPassword(String password) {
this.password = password;
}
private String userName = "张三 ";
private String password = "123456 ";
}
//////////////////////////////////////////
没有数据的bean
package utilbeans;
public class UtilsBeansTwo {
public UtilsBeansTwo() {
}
public String getPassword() {
return password;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {