The difference is Use of Generics.
When you declare the the type of a list object as a String, you need not do the explicit type casting while retrieving the value from list, moreover, It guarantees that, no other than String object allowed to insert into ArrayList.
Please try to understand that ArrayList inherits from List. Most of the books will go with using is nearly same as writing . Now is actually a non-benefit code.
You need to understand the reason for using Generics. Generics are used primarily to ensure Type Safety. Notice when you use the first and second statements you mention the data type(i.e. String) the list will be using hence preventing the list being accidentally used for some other types making it types safe...However the third definition is similar to writing in which you can pass any types which is not at all type safe. I wish I have explained you. I am still learning JAVA correct me if I am wrong..I will appreciate it.
List is a interface and ArrayList is a class which implements the List interface.
The inteface defines few methods.And arrayList implements those interface methods besideS few of its own methods.
So if you declare a variable using the List reference then you can call only the interface methods.
But if you decalre the variable using ArrayList then you can call those few extra methods.
But using the interface refernce has its own advantages .(Hope you know that.)
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !