import java.util.*; class Test { void foo(final ArrayList anObject) { List ls = anObject; List lss = anObject; List li = new ArrayList<>(); } }