Both chords add a fourth note to the triad. The major seventh adds the seventh tone of the scale, and the dominant seventh adds the flattened seventh tone of the scale.
Both chords add a fourth note to the triad. The major seventh adds the seventh tone of the scale, and the dominant seventh adds the flattened seventh tone of the scale.