Stream.toList cannot be abused and the difference from Collectors.toList
Stream toList()returns a read-only List which cannot be modified in principle. collect(Collectors.toList())By default, it returns an ArrayList, which can be added, deleted, modified and searched. 1. Background When I saw…