title: What is use of super.paint(g)?
body: <p>Can someone explain me what is the use of <code>super.paint(g)</code> where, <code>g</code> is a <code>Graphics</code>      variable in Applets or awt or swings or in Java.</p>
  
  <p>I have done research and found that it is used to override but what is the use of this override?</p>
  
  <p>I am a beginner. If possible can you explain the difference between <code>paint(g)</code> and <code>super.paint(g)</code> with a small <code>example</code> or please help me with this code?</p>
  
  <pre><code>/*
  Let us consider this code 
  This has only one paint declaration i.e; subclass's paint method declaration, no     declaration for superclass's paint function... when we explicitly call superclass's paint function 
  what is the use of super.paint(g) and is it going to use superclass's paint declaration??
  */
  
  import java.awt.*;
  import java.applet.*;
  /*
  &lt;applet code="superpaintDemo" height=768 width=1366&gt;
  &lt;/applet&gt;
  */
  class superpaintDemo extends Applet
  {
  
      public void paint(Graphics g)
      {
          super.paint(g);
          g.drawString("This is Demo",200,200);
      }
  }
  </code></pre>