日期:2014-05-20 浏览次数:20957 次
class Person
{
String name;
int age;
Person(String name,int age)
{
this.name=name;
this.age=age;
}
public String toSting()
{
return "我是:"+this.name+",今年:"+this.age+"岁";
}
}
class Demo
{
public static void main(String[] args)
{
Person p=new Person("zhangsan",25);
System.out.println(p.toString());
}
}