Hi,
This is not compulsory that a black body should have hole. Black body is an ideal body that absorbs all the incident electromagnetic radiation whatever be the frequency of the radiation. An approximate realization of a black body is a hole in the wall of a large enclosure.