Correct way of creating DTO
<p>When I create a Data transfer Object (DTO) which I use to store user input data to manager layer, I have a doubt that I'm doing it in correct way.</p>

<p>For example </p>

<p>Scenario one</p>

<pre><code>public class Person{

    private String name;
    private int age;  // primitive type
    private double weight; // primitive type

}
</code></pre>

<p>Scenario 2</p>

<pre><code>public class Person{

    private String name;
    private Integer age;
    private Double weight;

}
</code></pre>

<p>in this case what is the best scenario that I can use and what are the factors that I should think about when decide on each scenarios. Kindly advice me.</p>
