title: Can "main" in java return a String?
body: <p>Is it possible that public static void main(String[] args) in java returns <code>String</code> instead of <code>void</code>? If yes, how?</p>
  <pre><code>public static String main(String[] args)
  </code></pre>
  <p>instead of:</p>
  <pre><code>public static void main(String[] args)
  </code></pre>
  <p>when I change my code as below:</p>
  <pre><code>public static String main(String[] args) throws IOException {
      String str = null;
      TurkishMorphParser parser = TurkishMorphParser.createWithDefaults();
      str = new Stm(parser).parse(&quot;bizler&quot;);
      System.out.println(&quot;str = &quot; + str);
      String replace = str.replace(&quot;[&quot;,&quot;&quot;);
      String replace1 = replace.replace(&quot;]&quot;,&quot;&quot;);
      List&lt;String&gt; result1 = new ArrayList&lt;String&gt;(Arrays.asList(replace1.split(&quot;,&quot;)));
      String result = result1.get(0);
      System.out.println(&quot;Result = &quot; + result);
      return result;        
  }
  </code></pre>
  <p>I receive this error:</p>
  <pre><code>Error: Main method must return a value of type void in class Stm, please define the main method as:
  public static void main(String[] args)
  </code></pre>