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
/
Records
What happens to a component parameter rebound inside a compact constructor?
from Records
Java 25 LTS
intermediate
1 min
What happens to a component parameter rebound inside a compact constructor?
The compiler assigns the rebound value to the component field after the body completes.
Rebinding is ignored and the original argument is always stored.
Every rebound parameter creates an extra instance field.
A compact constructor may validate but may never rebind parameters.
Check
Ask AI about this kata
Report an error
next kata
What does this program print?
Predict the output
A new version is available
Reload