Johnson & Johnson shares gain after profit beat, raised outlook