Which sex of trees bears fruit?
The distinction between male and female is not that clear in plants, at least at the level of individuals. Actually the details may be rather complicated (see [1]), but in general we can distinguish between plants that have:


male and female individuals (dioecy)
male and female flowers on the same individual (monoecy)
flowers that have both male and female structures (bisexuality)


In the first case, only female individuals produce flowers that -- when fertilized by the pollen from the flowers of a male individual -- develop into a fruit. Examples are Hazelnut, common nettle and a few other species [2]. However, dioecy is rather rare among extant flowering plants [3]. 

Monoecious plant species are somewhat different. A good example is maize. The male flowers of a maize plant are located in the tassels at the apex of the stem, wheres the female flowers are are in the leaf axils. Note that each corn developed from a single flower and that the cob is actually the infructescense.

Then there are bisexual plants. In these, every flower has the potential to be fertilized and develop into a fruit, which is why they are also called perfect flowers. Plants have developed several strategies to prevent self-fertilization, e.g. the temporally delayed expression of female/male structures within the same flower.

Resources: 

[3]: Bawa, K. S. (1980). Evolution of dioecy in flowering plants. Annual review of ecology and systematics, 15-39.