how to pass object by reference in android to make changes in orignal object?
<p>friends,</p>

<p>i have code </p>

<pre><code> DalCategories selected_object= new DalCategories();
           for (DalCategories cat : DalCategories.EditPostCategory) 
           {     
               if(cat.getCategory_Id().equals(root_id))
               {
                   selected_object  = cat;

                   // add to list

                   if(selected_object.getSub_Category() != null)
                   {
                       for (DalCategories t : selected_object.getSub_Category()) 
                       {
                           if(t.getSub_Category() != null)
                           {
                              // MakeChangesInThisObject(t.getSub_Category());
                               adapter.addSection(t.getTitle(), new EfficientAdapter(this,t.getSub_Category(),selected_object.getSub_Category().get(0).getSub_Category()));
                           }
                       }
                   }
                   // add to list




                   break;
               }
            }
</code></pre>

<p>DalCategories.EditPostCategory has three levels i want to change third level object values and want this change should be done to DalCategories.EditPostCategory by reference and using MakeChangesInThisObject</p>

<p>any one guide me how to achieve this?</p>
