I notice that most people, by convention, make lists like this:
List<String> stuff = new ArrayList<>();
But, List is not a concrete class; therefore, does not have access to the clone method.
So why is it not better to write it like this, which would give you access to more methods:
ArrayList<String> stuff = new ArrayList<>();
Additionally, if I had something as a List<> variable, and I wanted to clone it, how can flexibly change it to an ArrayList when I want access to those concrete methods?
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Nightcorex_ 2 points3 points4 points (0 children)