What is the difference between google's ImmutableList and Collections.unmodifiableList ()?

后端 未结 5 1278
孤城傲影
孤城傲影 2020-12-08 02:11

From ImmutableList javadocs:

Unlike Collections.unmodifiableList(java.util.List), which is a view of a separate collection that can still change

5条回答
  •  青春惊慌失措
    2020-12-08 03:05

    You might also want to take a look at this question (What's the difference between Collections.unmodifiableSet() and ImmutableSet of Guava).

提交回复
热议问题