I mean, if you made me guess the sex of the person involved, I would certainly suspect it was a boy. Mischief of this kind tends to be more popular among boys. But a joke like this isn't intrinsically sexist, or anti-girl, or silencing of female voices
(Obviously, it's good if genuine sexism is halted in coed classrooms so that both boys and girls can learn.)