Does it look bad if you take an AP exam before the class?

What would be a better decision for AP CSA?

  1. Getting a 5 on the AP CSA exam and not taking the class at all (although I am majoring in CS)
  2. Not taking the AP CSA exam until I take the class (so it is still considered rigorous)