Choose the decision supported by each Java type or language contract.
Read the lessons
- Java generic wildcards: copy from a producer into a consumer
- Java type erasure: validate elements with an explicit Class token
- Java bridge methods: preserve overrides after generic erasure
- Java interface defaults: resolve a two-parent method conflict
- Java compact record constructors: normalize before field assignment
- Java instanceof patterns: keep a narrowed value inside its valid scope
- Java switch expressions: return one value from every state
- Java sealed hierarchies: switch over permitted request kinds
- Java annotation retention: expose metadata without pretending it enforces policy
- Java repeatable annotations: read every declared routing label
- Java enum constant bodies: keep each fee rule with its tier
Common Mistakes
Do not mistake compile-time type coverage or metadata for runtime authorization.
