No. But abstinence can.
No, because a condom does not protect the pubic area, only the
penis. You can get herpes even if you're protected. The only way to have
a better chance of not getting herpes is if you or your partner (which
ever has herpes) takes medication to reduce outbreaks. Its not 100% and
you can still get herpes.