Can anyone tell me the difference between whole and entire?

He ate the entire cake.
He ate the whole cake.

Is there a shade of difference? Or is it only for emphasis or rhythm?

Many thanks,
In your example, use only whole. The meaning of "entire" is clear, but it's not used in that situation. It is a matter of "common usage" dictating. However, if 20 million people use "entire" in that situation, then it becomes "correct".

He ate the whole cake.
You ate the whole cake.
I'm eating a piece of the (whole) cake.
And then there's that idiot in the infomercial on light night TV hawking yet another get-rich-quick scheme. This one involves creating a website on which you can sell his dietary supplement.

He keeps saying things like, "This is the greatest opportunity of your whole entire life!"