Added examples from Effective Java book