title: Why serialization of object that implements Serializable throws exception?
body: <p>I'm trying to pass two ArrayLists via Intent to another activity. Created this class to store these two arrays.</p>
  
  <pre><code>public class StorageBin implements Serializable {
      //storage variables
      public ArrayList&lt;String&gt; placesList;
      public ArrayList&lt;LatLng&gt; latLngArrayList;
  
      public void storeData(ArrayList&lt;String&gt; names, ArrayList&lt;LatLng&gt; locations) {
          placesList = names;
          latLngArrayList = locations;
      }
  }
  </code></pre>
  
  <p>I am putting them into intent as follows.</p>
  
  <pre><code>            StorageBin storageBin = new StorageBin();
              storageBin.storeData(placesList, latLngArrayList);
              intent.putExtra("storedData", storageBin);
  </code></pre>
  
  <p>Last line causes following exception. What am I doing wrong?</p>
  
  <pre><code>   FATAL EXCEPTION: main
     Process: lt.wilkas.isimintinosvietoves, PID: 24702
     java.lang.RuntimeException: Parcelable encountered IOException writing
     serializable object (name = lt.wilkas.isimintinosvietoves.MainActivity$StorageBin)
     at android.os.Parcel.writeSerializable(Parcel.java:1468)
     ...
  </code></pre>