title: J2ME getDisplay() method
body: <p>In J2ME to create the Display class object we use</p>
  
  <pre><code>private Display d;
  d=Display.getDisplay(this);
  </code></pre>
  
  <p>What is <code>this</code> as parameter?</p>
  
  <p>I know this refers to the current instance but when I write the following I get errors</p>
  
  <pre><code>d=Display.getDisplay(new MyClassName());
  </code></pre>
  
  <p>When I saw in book the method was written like below</p>
  
  <pre><code>static Display getDisplay(MIDlet midlet)
  </code></pre>
  
  <p>So then I tried this</p>
  
  <pre><code>MIDlet m;
  d=Display.getDisplay(m);
  </code></pre>
  
  <p>But I am getting errors and I cannot even pass <code>new MIDlet()</code> as parameter since it's an abstract class.</p>