several if else if conditions
<p>I have a java class inside there is a method which need to return some integer value based upon conditions met now, I have put some <code>if...else</code> conditions inside the method of class as shown below and in comment I have written when this conditions will be executed.</p>

<p>Please advise that my logic inside the method <code>def()</code> <code>if</code> conditions is correct or not and also please let me know if any conditions executed will it check for remaining conditions or not.</p>

<pre><code>class abc
{
  private static SUCCESS = 1;
  private static FAILURE = 2;

  public void int def()
  {
    if (a=20 &amp;&amp; b==30)
    {
        if (c==30 &amp;&amp; d==40)  // nesting IF condition will go if a=20 &amp; b=30
        { // do something
          return SUCCESS; // IF this condion is met will it check remaing conditions or not
        }
        else
        {
          return FAILURE; // IF this condion is met will it check remaing conditions or not
        }
    }
    else if( g==50 &amp;&amp; d==60)
    {
      // do something
      if (t==56 &amp;&amp; p==98) // nesting IF condition will go if g=50 &amp; d=60
      {
        // do something
        return SUCCESS; // IF this condion is met will it check remaing conditions or not
      }
      return FAILURE; // IF this condion is met will it check remaing conditions or not
    }
    else
      return FAILURE; // default return means if any othe if or else if block is satisfied then this default value will be returned from the method
  }
}
</code></pre>
