title: Is there any similarity between if else if and nested if?
body: <pre><code>  nested if
  
      **if(condition)**
      {
         **if(condition)**
         {
            statement-1;
         }
         else
         {
           statement-2;
         }
      }
      else
      {
          if(condition)
          statement-3; 
          else
          statement-4;
      }
        
  
  if else if 
  
    if(condition)
    statement-1;
    **else if**(condition)
    statement-2;
    else
    statement-3;
  </code></pre>
  <p>ANSWER:Look above syntax of both bidirectional. The nested if is an if statement used within another if statement.When we use if else if then an if statement is used within the else part of another if in this way,'nested if is similar to an if else if statement.</p>
  <p>i did not understand above answer.</p>