In males, one of two endocrine glands located in the scrotum that makes the hormones testosterone and inhibin which it releases in response to luteinizing hormone (LH) produced by the pituitary gland for the purpose of developing male sexual characteristics and producing sperm needed for reproduction.