McAfee interview question

Why would we use Java for a task and why would we use Python?