title: How to create Immutable List in java?
body: <p>I need to convert mutable list object to immutable list. What is the possible way in java?</p>
  
  <pre><code>public void action() {
      List&lt;MutableClass&gt; mutableList = Arrays.asList(new MutableClass("san", "UK", 21), new MutableClass("peter", "US", 34));
      List&lt;MutableClass&gt; immutableList = immutateList(mutableList);
  }
  
  public List&lt;MutableClass&gt; immutateList(List&lt;MutableClass&gt; mutableList){
      //some code here to make this beanList immutable
      //ie. objects and size of beanList should not be change.
      //ie. we cant add new object here.
      //ie. we cant remove or change existing one.
  }
  </code></pre>
  
  <h3><code>MutableClass</code></h3>
  
  <pre><code>final class MutableClass {
      final String name;    
      final String address;
      final int age;
      MutableClass(String name, String address, int age) {
          this.name = name;
          this.address = address;
          this.age = age;
      }
  }
  </code></pre>