Its the Chromosomes,
In many sexually reproducing plant species essentially alike in their gender condition. Many such 'sexually monomorphic' species are hermaphroditic.
Plants have the same function as animals, you may be knowing about the xx and yy chromosomes,,,
:)