Walk with at least one other person. This cuts your chances of being attacked in half. Take a security escort. Yes, it can be troublesome when they are busy, but it is much better than walking alone at night. Give the impression to an attacker that you have someplace to go and a reason to go there.
Confidence is also very important.
Be aware of your surroundings. If you are aware of what is going on around you then you will notice sooner if someone is following you, or you may give yourself more time to think your way out of an unpleasant situation. Also, if you are aware, you look aware, and the would-be attacker might pick someone else. Tell someone where you are going and when you will be back. Yes, you are an adult, but giving your roommate a place to start looking when you don't come home at 3am like you said you would might just save your life.