Best Practices ElseIf against Throw Exception
<p>In Java: Which is the most performance code and why?</p>

<pre><code>if (x==1) {
    ....
} else if (x==2) {
    ....
} else if (x==3) {
    ....
} else if (x==4) {
    ....
}
... rest code here...

or 

try {
    if (x==1) {
        ... 
        throw MyException(1);
    }
    if (x==2) {
        ... 
        throw MyException(2);
    }
    if (x==3) {
        ... 
        throw MyException(3);
    }
    if (x==4) {
        ... 
        throw MyException(4);
    }
} catch(MyException MEx) {
    ... rest code here ...
}
</code></pre>

<p>Thanks a lot!</p>
