title: Initialization of List in a JSF Managed bean
body: <p>I' have a question about initialization of List in the POJO as it follows the next code:</p>
  
  <pre><code>public class Person {
  
   //other fields...
   private List&lt;String&gt; friends=new ArrayList&lt;&gt;();
  
       public List&lt;String&gt; getFriends() {
          return friends;
       }
       public void setFriends(List&lt;String&gt; friends) {
          this.friends = friends;
      }
  
  }
  </code></pre>
  
  <p>OR is it better like this and have initalization in other class(like for example Bean(JSF))</p>
  
  <pre><code>public class Person {
  
   //other fields...
   private List&lt;String&gt; friends;
  
       public List&lt;String&gt; getFriends() {
          return friends;
       }
       public void setFriends(List&lt;String&gt; friends) {
          this.friends = friends;
      }
  
  }
  </code></pre>
  
  <p>So my question is what approach is better?</p>