Dear student.
If only contraception is an option, then chemical method is more effective as in case of barrier method, condoms or cervical caps may often break, which will thus compromise the efficiency of contraception.
But if the question of preventing STD's, then barrier method is considered as more effective.
Regards.