Barclays interview question

Java memory Management Garbage Collection