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

While we're in Brighton, let's get a stick of rock!

He threw a rock at me.
different meanings