ITeye博客

通过java反射获得属性值

sunlightcs · 2011-03-06 11:45 · 编程语言 · Java · Markdown


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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。