Does word "effect" have the same meaning in the following two sentences?

He just did it for effect.

The new law will come into effect on the first day of next year.
different meanings