"Black fight back, brown stay down."
Well, thats the very approximate rule of thumb. Black bears are generally not aggressive to humans unless you threaten them or their cubs. They'll avoid you so long as they hear you coming, if you see them first make lots of noise to scare them away. If they do attack, fight back and you may have a chance.
Brown bears (Grizzlies) are hard muth*f-rs, if they decide they want a piece of you your best chance is to play dead and let them take a nibble. For both types, don't run and don't climb trees, it won't end well.
We met a black adult on an evening club ride about a month ago, on a North Shore fireroad. That made the climb a bit more interesting! Luckily there were 9 of us, so the bear just ambled off into the bush and we carried on. Much rather meet a black bear on a ride than have a cougar stalking me…