Is the explicit specification of array lists considered as a bad practice since Java7? Why is it unneccessary from this version?
List<String> foo = new Arraylist<String>(); // before
List<String> bar = new Arraylist<>(); // from Java7
Is it just because it's defined in the List? Thanks!
Is the explicit specification of array lists considered as a bad practice since Java7?
It's not "bad practice" - it's just a little more longwinded than it might be. The two statements have exactly the same effect, so there's no downside to the longer version in that sense. You definitely don't need to go around "fixing" all your old code - but you may choose to use the shorter form when you're editing existing code anyway, or writing new code.
Why is it unneccessary from this version?
Because Java 7 introduced the "diamond operator" (not actually an operator at all) precisely to avoid having to specify type arguments redundantly. From the Oracle documentation on "Type Inference for Generic Instance Creation":
You can replace the type arguments required to invoke the constructor of a generic class with an empty set of type parameters (<>) as long as the compiler can infer the type arguments from the context. This pair of angle brackets is informally called the diamond.
This isn't the only new feature in Java 7 from a language perspective - again, see the documentation for details.
See more on this question at Stackoverflow