Northrop Grumman interview question

When would using Java be more beneficial than using C++?