读书人

this.name=quot;penyquot;如果name本身就为一个

发布时间: 2012-03-20 14:01:10 作者: rapoo

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

[解决办法]
import org.apache.commons.beanutils.BeanUtils;

BeanUtils.setProperty(beanObj, propertyName, propertyValue);

读书人网 >J2SE开发

热点推荐