BT Group interview question

Find bug in sample java code