Corn seed is actually a vegetable, a grain, and a fruit.
Corn seed is a vegetable because it is harvested for eating. (Usually sweet corn when grain is harvested at the milk stage.)
Corn seed is a grain because it is a dry seed of a grass species. (Usually field corn when harvested after the grain is relatively dry.)
Corn seed is a fruit because that is the botanical definition.
More details follow.
Corn (Zea mays) is sometimes called a vegetable grain. Corn is a monocotyledon with only one seed leaf like grasses. The easily identified "grains" (or cereal plants/grasses) such as wheat, oats, and barley are also monocots. A grain is defined as the harvested dry seeds or fruit of a cereal grass, or the term can refer to the cereal grasses collectively.
Field corn that is harvested when the seeds are dry would thus be considered a grain. Sweet corn when harvested before maturity is usually considered a vegetable. It is grown to be eaten fresh as a tender vegetable rather than as a dried grain suitable for grinding into flour or meal. A vegetable is defined as a plant cultivated for an edible part or parts such as roots, stems, leaves, flowers, or seeds/fruit.
If you want to be very precise, all cereal grains could be called vegetables, but by convention we separate the cereal grains from the rest of the "vegetables" such as peas, lettuce, potatoes, cabbage, etc.