Cognizant Interview Question

Departmental as well a java program on variance