C1000-010 · Question #26
How are objects removed from working memory?
The correct answer is C. delete statement. In rules engines like Drools, the delete statement is the standard, modern way to remove a fact (object) from working memory during rule execution, making it the correct choice. Options A (clearObject()) and B (removeobject()) are fabricated method names that do not exist in…
Question
How are objects removed from working memory?
Options
- AclearObject ()
- Bremoveobject()
- Cdelete statement
- Dretract statement
How the community answered
(54 responses)- B2% (1)
- C94% (51)
- D4% (2)
Explanation
In rules engines like Drools, the delete statement is the standard, modern way to remove a fact (object) from working memory during rule execution, making it the correct choice. Options A (clearObject()) and B (removeobject()) are fabricated method names that do not exist in any standard rules engine API. Option D (retract) is the tricky distractor - it was the original keyword in older versions of Drools (pre-6.0) and still works as an alias, but delete is the current preferred and official statement. For the exam, remember: "delete" is what you do when a fact is no longer true - just as you delete a record that shouldn't exist anymore. If your course material uses Drools 6.0+, delete is the answer; if you see both delete and retract as options, choose delete as the modern standard.
Topics
Community Discussion
No community discussion yet for this question.