Any doctor can examine, not teen but any male patient in all the way depends upon for which problem doctor is examining.
Doctor will ask for his undergarment off.
For general male genitals he can be examined while sleeping in supine position.
But as you mean to say for hernia
examination, he is examined while standing position, as due to standing abdominal pressure increases and he will see for any bulging coming out in scrotal region or in inguinal region.
He may ask for coughing or to inflate lower abdomen to see for bulging to see for hernia.
Ok and bye.