Protoandry and protogyny are examples of
Dichogamy
Protandry refers to the maturation of stamen earlier than pistil and protogyny is vice versa and both of them are examples of dichogamy. Dichogamy is the condition wherein pistil and stamen matures at different times in the same flower. This is a device to prevent self-pollination.
Herkogamy is a condition wherein the stamen and pistil are separated in a flower in such a way that self-pollination becomes impossible. Heterostyly is a form of herkogamy wherein the styles of a flower differ in length from the stamen to prevent self-pollination.