Nimmetry Interview Question

Java concepts