Help ! What does it mean ... if anything ?

This is probably not the place to ask and it's a pretty meaningless question, but it has been bothering for a while. Last year there was this guy in my class. I found him attractive, but I'm supper shy and insecure. Other shy girls will understand that our lack of socialization is sometimes misinterpreted for being stuck up.  He would never talk to me (actually we talked only once) but he would flirt with the girls around me and he would always stare at me or throw glances at me . But when we would have to work together in group projects for the class he would look at the ground and pretend that I wasnt there. The class ended and the following semester I didn't think much of him. The end of the semester I went to an event. I was sitting by myself studying when this kid sat next to me I didn't look up to see who it was but he kept looking at me. I thought he was going to ask me to move. Come to find out it was him and he told me he thought I was so beautiful. So here's my dilemma. Did he mean it or did he say it to me because he felt like I was a loner or that I was insecure . What are all of your opinions ?