design patterns entry in Java