`
sunlightcs
  • 浏览: 73081 次
  • 性别: Icon_minigender_2
  • 来自: 杭州
社区版块
存档分类
最新评论

通过java反射获得属性值

阅读更多
package com.juziku;

/**
 * 反射类
 * @author sunlightcs
 * 2011-3-5
 * http://hi.juziku.com/sunlightcs/
 */
public class ReflectPoint {
	/**
	 * 私有变量x
	 */
	private int x;
	
	public int y;
	public String str1 = "abc";
	public String str2 = "123";
	
	public ReflectPoint(int x, int y) {
		super();
		this.x = x;
		this.y = y;
	}
	
}

全文请访问:http://www.juziku.com/wiki/241.htm




6
13
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics