Two species, X and Y, are competing for the same resource (plant). Species X prefers to eat the leaves of the plant while species Y prefers to eat the fruits. This is an example of
Niche overlap leads to competition. Resource partitioning is a mechanism that enables two species competing for the same resource to have more distinct niches in order to avoid competition and coexist (no exclusion).