DEV Community

Discussion on: Java In 2019 And Beyond

 
lemuelogbunude profile image
Lemuel Ogbunude • Edited

Oh lol, my initial desire was to answer the "Lecturer's question" and create a list first, so the code was initially different.

It initially created a list, assigned it to a variable and then worked on it, but when I shortened the code I didn't bother on (I might have felt lazy :/) to remove the creation of an intermediate collection.

Thanks for the advice though.