That's a good question, depends on the size of the person using the gun
I'd recommend a large caliber revolver, 44 magnum and up, so that it never jams in a time of need, with hollowpoint rounds to maximize size of wound. If your are worried about bear attack make sure the revolver fits your hand so you can have a good, controlling grip on the revolver and that you can practice and can shoot accurately with it without flinching from the recoil.
A gun of a human
Black Bear.
black bear
the californian black bear.
Use the final fall gun.
fish
To the best of my knowledge unless you are a convicted felon you can own a black powder gun.
very well placed shots from a very skilled shooter could potentially bring down a black bear, however a 9mm is not the gun of choice.
ak74u
Porters x2 ray gun and zuse cannon
use the ray gun or the thunder gun
M14