How can you run a Java program without main method?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8605137/printing-message-on-console-without-using-main-method">Printing message on Console without using main() method</a>  </p>
</blockquote>



<p>Can someone suggest how can a JAVA program run <strong>without</strong> writing a <strong>main method</strong>..</p>

<p>For eg:</p>

<pre><code>System.out.println("Main not required to print this");
</code></pre>

<p>How can the above line be printed on console <strong>without</strong> using the <strong>public static void main(String arg[])</strong> in the class.</p>
