标题: 对象引用 [打印本页] 作者: zhao543 时间: 2017-3-23 17:14 标题: 对象引用 public class Test
{
public static void main(String[] args)
{
Human aPerson = new Human(160);
}
}
class Human
{
/**
* constructor
*/
public Human(int h)
{
this.height = h;
}
/**
* accessor
*/
public int getHeight()
{
return this.height;
}