public class Person
{
int id;
int age=20;
Person(int _id,int _age)
{
id = _id;
age = _age;
}
public static void main(String[] args)
{
Person tom = new Person(1,20);
Person lily = new Person(2,22);
System.out.println("tom_id="+tom.id+",tom_age="+tom.age);
System.out.println("lily_id="+lily.id+",lily+age="+lily.age);
Point p = new Point();
System.out.println("x="+p.x+",y="+p.y);
}
}
class Point
{
int x;
int y;
}
-------------