title: Exiting a non void method? (Java)
body: <p>I was wonder how you would go about exiting a method early. If this was a void type, I would just do "return", however since this is an int type, it wants me to return an integer. How do I return to main without returning any integers. Thanks.</p>
  
  <pre><code>public static int binarysearch(String[] myArray, String target, int first, int last)
  {
      int index;
  
      if  (first &gt; last)
      {
          index = -1;
          System.out.println("That is not in the array");
          // Return to main here
      }
  </code></pre>