Deloitte Interview Question

Java basics