If I need serializable should i use concrete List (e.g. ArrayList) or (Serializable)List?
<p>We have a discussion in office and cannot understand which approach is better</p>

<p>I have a class (SomeClass) with some method which receives Serializable object. The signature is following:</p>

<pre><code>public void someMethod(Serializable serializableObject){
    ...
}
</code></pre>

<p>And I need to call this method from another class, but I should provide it with some List as fact parameter. There are two different approaches </p>

<h3>1. Serializable</h3>

<pre><code>private SomeClass someClass;

public void doSomething() {
    List&lt;String&gt; al = new ArrayList&lt;String&gt;();

    al.add("text");

    someClass.someMethod((Serializable)al);
}
</code></pre>

<h3>2. ArrayList</h3>

<pre><code>private SomeClass someClass;

public void doSomething() {
    ArrayList&lt;String&gt; al = new ArrayList&lt;String&gt;();

    al.add("text");

    someClass.someMethod(al);
}
</code></pre>

<ol>
<li><p>Benefit of the first example is that it adheres to the java’s best practices which says: use interface instead of concrete realization for reference type and any programmer while reading that source will understand that we don't need special behavior of the ArrayList. And the only place we need it's serializable behavior we are adding this behavior by casting  it to the Serializable interface. And programmer can simply change this current realization of the List to some other serializable realization, for example, LinkedList, without any side affect on this element because we use interface List as it`s reference type.</p></li>
<li><p>Benefit of the second example is that we refer to ArrayList as to class which have not only List behavior but also Serializable behavior. So if someone looked at this code and tried to change ArrayList to List he would receive a compile time error which would reduce time for programmer to understand what is going on there</p></li>
</ol>

<p>UPDATE: we can't change someMethod signature. It came from a third-party company and we use it not only for Serializable Lists but also for Strings, Integers and some other Serializable objects</p>
