0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

リストを変更しようとするとunsupportedOperationExceptionが起こる

Posted at

リストを変更しようとするとunsupportedOperationExceptionが起こる
例)testList.remove(0)

List testList = List.of("test1","test2");
List.ofは中身が変更できない

リストの中身を変更する可能性がある場合は以下のようにする
List testList = new ArrayList(Arrays.asList("test1","test2"))

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?