Dear student.
Heterocrine glands are the glands that perform dual function i.e perform both endocrine and exocrine function. Testes and ovaries are called heterocrine glands because they perform both endocrine and exocrine functions.
The endocrine function of testes and ovaries is the secretion of hormones - testosterone and progesterone respectively.
The exocrine function of testes and ovaries is the production of gametes - sperms and eggs respectively.
Pancreas is also called as heterocrine gland as it performs more than one function ( =mixed function) i.e. it acts as both exocrine(secrets digestive enzymes) and endocrine(secretes hormones) gland. Pancreas secretes two hormones glucagon and insulin as a part of its endocrine function and pancreatic juice as a part of its exocrine function.
Regards.