HSBC Interview Question

Java concepts