<bean id="dog" class="Dog" p:age="10"/>
public class Dog
{
private String name="Sharik";
private int age=10;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name=name;
}
public int getAge()
{
return age;
}
public void setAge(int age)
{
this.age=age;
}
}