When wca4z generates Java modules from refactored COBOL services, why is dependency injection recommended for connecting modules?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Think of it like working hands-on with IBM mainframe systems — the answer here is 'Dependency injection is required by the IBM watsonx Code Assistant for Z license terms for all generated code'. Dependency injection decouples Java modules by providing dependencies at runtime rather than hardcoding them, simplifying unit testing with mocks and making it easy to replace implementations independ. On real mainframe exams, this concept comes up repeatedly so make sure you have it locked in.
Full explanation below image
Full Explanation
Dependency injection decouples Java modules by providing dependencies at runtime rather than hardcoding them, simplifying unit testing with mocks and making it easy to replace implementations independently.