Way to exit from the method
<p>Is there any way to exit from the method? I hear that there are two way to exit.</p>

<p><strong>One :</strong> throw Exception. </p>

<pre><code>public void dosomething() {
    if(...) {
        throw new MyException();
    }
             // there might be another process.

}
</code></pre>

<p><strong>Two :</strong> return somevalue. Even void method, we can return the value.</p>

<pre><code>public void dosomething() {
    if(...) {
        return;
    }
             // there might be another process.
}
</code></pre>

<p>Question is, Is there any better way?</p>
