Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Java
/
Interfaces
What is true of `List<String> EVENTS = new ArrayList<>();` declared in an interface?
from Interfaces
Java 25 LTS
beginner
1 min
What is true of `List<String> EVENTS = new ArrayList<>();` declared in an interface?
The reference is public, static, and final, but callers can still mutate the list.
Every implementing object receives an independent list.
The declaration is illegal because interface fields cannot use constructors.
The list and all of its elements become deeply immutable.
Check
Ask AI about this kata
Report an error
previous kata
Which change definitely makes a valid functional interface stop being a functional interf…
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload