Visa Inc. interview question

Few rounds of java question