Cognizant interview question

Tell me why java is platform independent?