Search code examples
javajava-8akkaactor

stop(getSelf()) vs stop(this.getSelf())


I have been studying Akka Actors. I know the meaning of stop(ActorRef) which kills the running actor. But what is the difference between getSelf() and this.getSelf() while killing an actor? Thank You in advance!.


Solution

  • There's no difference between them, it's just that some people believe it enhances readability.

    Readability is an important thing in programming but in this specific case, I personally believe they are just as readable with or without the this prefix.