add functional java programming sample