Given the code fragment:
How can you apply DateConverter to the birthday field?
Given the code fragment:
How can you apply DateConverter to the birthday field?
To apply the DataConverter to the birthday field, the correct method is by adding @Converter(autoApply=true) at line 1. This ensures that the custom converter is automatically applied to all attributes of the specified type within the persistence unit. Other options are incorrect as they either specify incorrect syntax or do not provide the mechanism for consistent automatic conversion across the entity.
I think the answer is C. based on example 2 in the link: https://docs.oracle.com/javaee/7/api/javax/persistence/Convert.html
Answer C
It must be @Convert(converter=DateCoverter.class)