Avenue Code interview question

String management in Java Threads management