If a young man turns 18 at any time prior to actually attending one of the service academies, he is required to register.
If he turns 18 while attending, he does not have to register.
If he leaves the Academy and active military duty prior to his 26th birthday, he will be required to register then.