Which is correct?

I took this class before.

Or

I have taken this class before.

I think it is the first one.

Both are correct.

Actually, the correct answer is the second option, "I have taken this class before." Here's why:

In English, we use the present perfect tense (have + past participle) to talk about actions or experiences that happened at an unspecified time in the past, but have a connection to the present. In this case, "I have taken this class before" implies that the action of taking the class happened in the past, but the speaker is emphasizing their past experience.

On the other hand, the first option, "I took this class before," is in the simple past tense. This tense is used to describe completed actions in the past that have no connection to the present. While grammatically correct, it doesn't convey the same meaning as the present perfect tense.

To determine the correct answer, it's helpful to understand the different meanings conveyed by the tenses. In this case, the present perfect tense is the appropriate choice.