Java code example of  design creational pattern pool object