The stamen is the male reproductive organ of a flower, and it consists of two parts: the filament and the anther. The filament is a slender stalk that supports the anther, holding it in a position where pollen can be effectively released or accessed by pollinators. The anther is the expanded, often bilobed structure at the tip of the filament that contains pollen sacs (microsporangia), where pollen grains (containing male gametes) are produced through meiosis and subsequently released.
The ovary and stigma are parts of the carpel (pistil), which is the female reproductive organ. The ovary contains the ovules, and the stigma is the receptive surface that captures pollen. "Filament and ovary" incorrectly combines a male part with a female part. "Sepals and petals" are accessory floral parts: sepals protect the flower bud, and petals attract pollinators. Neither is part of the stamen.
For examination purposes, remember the complete structure: a stamen = filament + anther (male), and a carpel = stigma + style + ovary (female).