Oracle
1Z0-419 · Question #81
Consider the validation code in a Shipping entity object that is designed to ensure that the date ordered is <= the date shipped. public boolean validateDateShippedAfterDateOrderedQ { Date…
The correct answer is C. compare validator on the DateOrdered attribute. See the full explanation below for the reasoning.
Question
Consider the validation code in a Shipping entity object that is designed to ensure that the date ordered is <= the date shipped. public boolean validateDateShippedAfterDateOrderedQ { Date DateShipped = getDateShipped(); Date DateOrdered = qetDateOrdered(); if (DateShipped != null && DateShipped.compareTo(DateOrdered) < 0){ return false; } return true; } Which entity object validation rule should you integrate this with'' (Choose the best answer)
Options
- Acompare validator on the DateShipped attribute
- Bmethod validator on the DateShipped attribute
- Ccompare validator on the DateOrdered attribute
- Drange validator on the Shipping entity object
- Emethod validator on the Shipping entity object
How the community answered
(20 responses)- A15% (3)
- C75% (15)
- D5% (1)
- E5% (1)
Community Discussion
No community discussion yet for this question.