this.namepeny,如果name本身就为一个变量,该怎么写?this.+vName+ peny 这样不行,因为变量比较多,需
this.name="peny",如果name本身就为一个变量,该怎么写?
this.+vName+= "peny "这样不行,因为变量比较多,需做成动态.
[解决办法]
import org.apache.commons.beanutils.BeanUtils;
BeanUtils.setProperty(beanObj, propertyName, propertyValue);
