Mavafanculo said:to clarify:
the answering student could see the other two were green.
the answering student noticed that one of the other students looked ONLY at the answering students hat before raising his hand.
so the answering student knew his own hat was green and therefore all 3 green.
"He asked "raise your hand if you see a green hat" to which all three raised a hand."
The question implies that each student saw a green hat, not where the students were specifically looking. It's assumed they looked at each other.