What is the difference between this lines:
List<Object> list = new ArrayList<Object>();
and
List list = new ArrayList();
As i understand, all is object and when you do just List list, you just mentioned that.
Ultimately both statements are same. In this case there is no difference since every class in java extends Object.
You'll see the difference , if you take any specific object other than Object.
For ex:
List<String> vs List
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With