Possible Duplicate:
When best to use an interface in java
Hi,
When defining a class should I always define a corresponding interface ?
What is the advantage of
List list = new ArrayList();
Why not just -
ArrayList arrayList = new ArrayList();
Thanks