BT Group Interview Question

Find bug in sample java code