title: What is Java's 'self' keyword
body: <p>I'm trying to write a factory method in an abstract class in Java (so I want it to return a new instance of the extending class, rather than the super-class).</p>
  
  <p>In PHP I'd do this using the <code>self</code> keyword:</p>
  
  <pre><code>abstract class Superclass {
      public static function factory($arg) {
          return new self($arg);
      }
  
      private function __construct($arg) {}
  
      abstract public function doSomething() {}
  }
  </code></pre>
  
  <p>Does Java have a keyword like <code>self</code> I can use for this?</p>