0

Being just a beginner in JAVA, I am unable to understand the difference between the two. Both the codes were working perfectly in my Eclipse program.

Vaibhav Bajaj
  • 1,904
  • 14
  • 29
  • There is no difference. The latter (aka the diamond operator) is only supported since Java 7. – Eran Jul 17 '16 at 09:31
  • Also you can read : http://stackoverflow.com/questions/38346510/propper-initialization-of-an-arraylist and http://stackoverflow.com/questions/17033206/is-there-a-difference-between-explicitly-putting-the-type-into-the-diamond-opera @T.J.Crowder Thanks for reminding the dupe. – Suresh Atta Jul 17 '16 at 09:41

0 Answers0