//这里改变了对象里面的值
field.set(obj, newValue);
}
}
}
}
class ReflectPoint
{
private int x;
public int y;
public String st1 = "ball";
public String st2 = "basketball";
public String st3 = "itcast";
//这里可以使用eclipse快捷键 ALT+SHIFT+S 快速创建构造方法
public ReflectPoint(int x, int y)
{
super();
this.x = x;
this.y = y;
}
public String toString()
{
return st1 +":" +st2 +":" +st3 +":" ;
}
}