Visa Inc. interview question

Two sum with unique pair, why java is platform independent.