Updated Java cookbook