Genpact interview question

Singleton bean example Coding problem with streams