title: How to use multiple conditions on the same data in an if else loop? - java/android
body: <p>I have 3 <em>edittexts</em> with input type as <strong>number</strong> and 1 <em>button</em> that say <strong>Done</strong></p>
  
  <p>I have to check two conditions for the values entered in the <em>edittexts</em></p>
  
  <p>When I click on the button <strong>Done</strong> I should be able to do thee following things</p>
  
  <p>----First is to check if the edit texts are empty or not</p>
  
  <pre><code>if ((a.getText().toString().equals("")) || (b.getText().toString().equals("")) || (c.getText().toString().equals("")))
      Toast.makeText(getApplicationContext(), "Don't leave grade points empty",0).show();
  </code></pre>
  
  <p>----Second is to check if the values entered are within a certain range</p>
  
  <pre><code>if((a1&lt;5 || a1&gt;10)||(b1&lt;5 || b1&gt;10)||(c1&lt;5 || c1&gt;10))
      Toast.makeText(getApplicationContext(), "Range should be between 15 to 25", 0).show();
  </code></pre>
  
  <p>both a,b,c and a1,b1,c1 represent the same values, i've just parsed the values of a,b,c to <strong>int</strong> in a1,b1,c1</p>
  
  <p>----Then in the else part I should be able to use these values if they pass the above conditions.</p>
  
  <pre><code>else
  {
  //do something
  }
  </code></pre>
  
  <p>My problem is how to make it work as I face a  <strong>Force close</strong> error on clicking the <strong>Done</strong> button when all 3 <em>edittext</em> are empty. I tried to put those in <em>if, else if and else loop</em> and also tried <em>if,if and else loop</em>.</p>
  
  <p>How should I code that if it doesn't satisfy both the conditions and then go to the else part?</p>
  
  <p>Help !! :)</p>