Collision detection. What is the difference between these to codes?

Hi Guys, 

I want to define a collision detection on an object. 

what is the difference between this 2 codes? 

this code:

ball.collision = onLocalCollision ball:addEventListener( "collision", ball )

and this code:

ball:addEventListener( "collision", onLocalCollision )

Which one is better? are they the same?

Thank you,

Andy