I have some advice.
Last semester this HOT guy was sitting by himself. So the second class, I went up to him and asked if he took good notes(prof was very boring),see? An excuse to talk. Then I sat next to him every single class and found an excuse to talk. I think he's bi, but either way, he has a gf. Still, I made a friend.
Don't take it personal that he walked past you. Guys do that. No explanation other than that he probably wants you to approach him. Or maybe he had something important on his mind to talk about.
DON'T doubt yourself. Force yourself to at least say hi to him every time you see him. Don't leave it at hi if you can manage, ask how he is, if he started studying,well...kinda late now, on Monday after the exam, ask how he did.
Talk about the exam,then bring up meeting together for the next exam. Ask about him: if he dorms, what town he's from, plays sports, try and get to know him. Unless he's a jerkoff, he'll answer and ask you the same questions. Don't try and be anything other than yourself. Don't force conversation if it gets awkward. Say things like,"See you next class" to confirm you're going to start talking to him every time and let him know your intentions.
If he thinks you're lame, it's his loss. I doubt it though, because the same thing happened to me. This guy kept gravitating towards me each class (even though there were plenty of other empty seats), until last class he sat two seats away from me, it was always in front of me, behind me, etc. So I found excuses to talk, like he had a sandwhich marked $5 and I asked why he bought such an expensive sandwhich(haha,it made good convo)
Next class,I asked to see his notes, then when class was ending,asked if I could copy them next class and introduced myself. The normal, bored face lit up when I introduced myself,so next class I'm going to sit next to him, and just be there, friendly and well... I hope it works out for you
