Cognizant interview question

Why is Java platform independent?