Ok, I hope this makes sense. ;)
Basically, "to have studied" and "to have been studying" mean the same thing. The first is active, the second is passive. The first is past, the second is present.
And, most importantly, these verb phrases would decide the tense of the rest of the sentence.
Each phrase is called a participle. The "-ed" denotes past; the "-ing" denotes present.
So, "have studied" is past participle, and "have been studying" is present participle.
"I have studied longer than any other classmate."
"I will have been studying longer than any other classmate."
"I have studied every night."
"I will have been studying for 3 hours when you arrive."