Simple Container code in Java Language