Barclays interview question

garbage collection in java