Northrop Grumman Interview Question

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