title: How can I get the instance name in Java?
body: <p>I would like to know if we can get the name of instance name in Java. For example:</p>
  
  <pre><code>class A {
    public void run() {
      System.out.println("Name: " + ????);
    }
  }
  
  public class Main
  {
    public static void main(String[] _args) {
      A p = new A();
      A q = new A();
  
      p.run();
      q.run();
    }
  }
  </code></pre>
  
  <p>My expectation result would be:</p>
  
  <pre><code>Name: p
  Name: q
  </code></pre>
  
  <p>Is it anyway to get this?</p>