Common Java design pattern examples