address.java

来自「J2EE 技术 源码 书籍源代码(j2ee编程技术)」· Java 代码 · 共 66 行

JAVA
66
字号
/*
 * Created on 2004-7-1
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package com.ejbstudy;

/**
 * @author haoyulong
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public class Address {
	String city=null;
	String street=null;
	int houseno=0;
	
	
	/**
	 * @return Returns the city.
	 */
	public String getCity() {
		return city;
	}
	/**
	 * @param city The city to set.
	 */
	public void setCity(String city) {
		this.city = city;
	}
	/**
	 * @return Returns the houseno.
	 */
	public int getHouseno() {
		return houseno;
	}
	/**
	 * @param houseno The houseno to set.
	 */
	public void setHouseno(int houseno) {
		this.houseno = houseno;
	}
	/**
	 * @return Returns the street.
	 */
	public String getStreet() {
		return street;
	}
	/**
	 * @param street The street to set.
	 */
	public void setStreet(String street) {
		this.street = street;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		// TODO Auto-generated method stub
		return city+street+Integer.toString(houseno);
		
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?