Riding a bicycle on the sidewalk is illegal. It is also dangerous because you can get killed by someone backing out of a driveway. Drivers don’t expect other vehicles to be on the sidewalk. Bikes belong in the street.
Sorry, in urban areas, I find that riding on the sidewalks is much less dangerous than riding in the street. YMMV.