I know last hitting gives you the gold for the kill, but what about experience?

Is there any difference between last hitting a creep or standing next to it, in regards of experience? What about Heroes and structures?