The gravitational potential energy of an object is given by

where m is the mass, g the gravitational acceleration and h the height with respect to a reference point.
Here we know the potential energy of the apple, U=6.0 J, its height, h=3.00 m, and

, so we can find the mass of the apple by re-arranging the formula:
