What is the purpose of specifying different types on the left and the right side in Java variable declarations?
For example, code like this is standard:
List<String> l = new ArrayList<>();
Why don't:
ArrayList<String> l = new ArrayList<>();
or
Object l = new ArrayList<>(); // Silly example but shows two extremes