Is the word "say" used in the same way in the following two sentences?

What does the law say?

She said 'Hello' to everyone in the office.
different meanings