Coconut palms are monoecious ,but the flowers are UNISEXUAL. The meaning is ; there are separate male and female flowers that are BORNE on one and the same tree.
Let us compare it with Papaya plant . In papaya also the flowers are UNISEXUAL. Male and Female flowers are different. IN ADDITION , they are BORNE on different plants. So in Papaya , the plant is dioecious and flowers are unisexual.
Therefore in Papaya DIY Only the Female plants bear fruits, while the Male plant and its flowers contribute pollen for fertilization.
Now , in coconut , since both , male and female flowers are borne on one and the same tree, all the coconut palms bear fruits. There is nothing like Male coconut tree/palm and female coconut tree / palm .
The illustrations below will show you the flowers together on the tree. The ones with distinct spheres are the female flowers ( They are near the base only )and each sphere is young ovary that will turn in to fruit on maturity. The other flowers ( extremely numerous ) are the male flowers.
This is excellent image ( Enlarge it by clicking on the inbuilt arrow near the lower end of the picture. Put the curser on the picture first. )
Coconut palm looks like this ==
And bears fruits like this=
IMPORTANT NOTE:- Palm tree is a general term indicates only the appearnce of the tree. ALL PALMS ARE NOT COCONUT PALMS. THERE ARE MORE THAN 2000 DIFFERENT TYPES OF PALMS . BUT COCONUTS ARE BORNE BY ONLY ONE COCOS NUCIFERA!!!!
THERE ARE DATE PALMS ALSO IN ARABIAN COUNTRIES ; BUT THEY PRODUCE DATES ONLY AND NOT COCONUTS.
THERE ARE OIL PALMS , THE FRUITS OF WHICH PRODUCE EDIBLE OIL. BUT THEY DO NOT BEAR COCONUTS.
THERE ARE BETELNUT PALMS AS WELL !!