class Person
{
private int age;
void shout()
{
System.out.println("my age is "+age);
}
public void setAge(int x);
{
if(age<0)
return age;
age = x;
}
public int getAge()
{
return age;
}
public void getSomeOne(Person p)
{
p.shout();
}
public static void main(String [] args)
{
Person p1= new Person();
Person p2= new Person();
p1.age=-30;
p1.shout();
p2.shout();
p1.getSomeOne(p2);
}
}
class TestPerson
{
public static void main(String [] args)
{
Person p1 = new Person();
Person p2 = new Person();
p1.shout();
p2.shout();
getSomeOne(new Person());
}
public static void getSomeOne(Person p)
{
p.shout();
}
}