HighRadius Interview Question

asked to write Java codes