日期:2014-05-20  浏览次数:20597 次

this.name="peny",如果name本身就为一个变量,该怎么写?
this.+vName+= "peny "这样不行,因为变量比较多,需做成动态.

------解决方案--------------------
import org.apache.commons.beanutils.BeanUtils;

BeanUtils.setProperty(beanObj, propertyName, propertyValue);