Black bear are not typically aggressive. Don't aggravate them, follow good camping policies, and have fun. Don't worry about black bear.
I've had many encounters with black bear, with several up close. One was trying to steal my pack and I smacked it on the butt with my walking stick to chase it away. He was pretty persistent, most of the time all you see is their rear end as they're running away from you. If they don't immediately run, say something to them, like "Hey bear, go away". That's usually all you need. As a last resort, just the report of your pistol should send them running.
I carry in the backcountry, but not for black bear. I'm far more worried about feral hogs and two legged varmints.
Brown and grizzly are a different story. For them, I suggest a rifle. And a scope. And enough distance that you have to use the scope.
Az