Is bar used to mean the same thing in the next two sentences?

He bought a hot dog and a coke at the bar.

The boat ran aground on a submerged bar in the river.
different meanings