当前位置: 代码迷 >> J2SE >> this.name="peny"如果name本身就为一个变量,该如何写
  详细解决方案

this.name="peny"如果name本身就为一个变量,该如何写

热度:265   发布时间:2016-04-24 17:06:43.0
this.name="peny",如果name本身就为一个变量,该怎么写?
this.+vName+= "peny "这样不行,因为变量比较多,需做成动态.

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

BeanUtils.setProperty(beanObj, propertyName, propertyValue);
  相关解决方案