What does this block of code do?

后端 未结 6 990
鱼传尺愫
鱼传尺愫 2021-01-24 13:19

I\'m not quite sure what this means or whats it doing, Could some one elaborate?

Player player = (Player) sender;
6条回答
  •  南笙
    南笙 (楼主)
    2021-01-24 13:36

    That's a plain old java type cast. See the JLS Casting conversion for the full details.

    It assumes that sender is type-compatible with a Player.

提交回复
热议问题