Answer:
Both of them stimulate immune system so leads to active immunity. Acquiring measles will give immunity against measles only but getting vaccine will give immunity against measles, mumps and rubella.
Step-by-step explanation:
Measles vaccine is not yet available alone in all countries instead MMR vaccine is given which contains live attenuated viruses for measles, mumps and rubella. In case of vaccination live viruses will multiply and produce antibodies against all three diseases and memory cells formed will be for all three of them but in case of getting measles, memory cells will be against measles only.