Mixing between the genders is the gate for all evils. Islam promotes segregation between the sexes for their own good and benefit. This is promoted in the most sacred places; the mosques. The Prophet salla Allahu alaihi wa sallam told us that the worst row of the men in prayer is the last and the worst row of women is the first. He also warned us from mixing when he said that the mixing with the brother in law and the uncle of the husband is like allowing death to come to your wife and the women in your family who are not Mahram to these men.     However, men by nature are the bread earners. They need to study in universities so that they would be able to work honorably and earn. Therefore, it is permissible for boys to study in such an environment due to necessity providing that they lower their gaze and that they avoid mixing and socializing with the girls.


Kindly refer to the following link(s):


Are boys allowed to study at mixed universities?


Are men allowed to work or study in co education colleges in islam? (mixed university)