Darkbrowneggs is correct - it's because the female flower was not fertilised. It often happens at the beginning of the season, when there tends to be a flush of either all male or all female flowers, or there are no insects . You can help fertilisation if you take a male flower, if you have one, and remove the petals then wipe the pollen from the inside bit into the female flower. One male flower can then fertilise two or three females.
The hole will just be because the seeds have not developed.