Create instance of a Class

One can create an instance of a java bean. To appreciate the use of it, let us consider a case where one has to create an instance of a java bean with some twenty fields as shown below.


       
 public class SomeClass
 {
       public void someThing () {

		final PersonVo personVo = new PersonVo();   
 
  		personVo.setFirstName(firstname); 
 		personVo.setLastName(lastname);
		personVo.setTitle(title);
		personVo.setDateOfBirth(dateOfBirth); 
		// and so on with twenty other fields.
	 	// more code ...
	}
}


fdslfdslfjdslkfjklsdjf
       

       	<bean id="personServiceImpl" class="com.test.service.impl.PersonServiceImpl">
       		<property name="addressDAO" ref="addressDAO" />
	</bean>

fdkfdskfhsdkfhdskhfdskhfsdkhfsd
Design downloaded from Free Templates - your source for free web templates