Check if the for loop is done before proceed to a statement
<p>Got a few problem here. I have created a arrays of EditText and it is working fine. Now I am getting an error when one of the EditText is empty. 
Here is my code:</p>

<pre><code>int[] textIDs = new int[] {R.id.etFirstName, R.id.etLastName, R.id.etEmail, R.id.etAddress, R.id.etCity, R.id.etRegion, R.id.etMobile, R.id.etLandLine, R.id.etYear, R.id.etMonth, R.id.etDay };
        for(int j=0; j&lt;textIDs.length; j++) {
            EditText editText = (EditText) findViewById(textIDs[j]);
            if(editText.getText().toString().trim().equals(""))
            {
                 // editText is empty
                Toast.makeText(MainActivity.this, "Request cannot performed..\n Please ensure all fields are filled", Toast.LENGTH_SHORT).show();
                break;
            } 
            else 
            {
                 // editText is not empty
                Toast.makeText(MainActivity.this, "12", Toast.LENGTH_SHORT).show();
            }
</code></pre>

<p>The main problem using this code is that the loop continues to do its function that this code
       <code>Toast.makeText(MainActivity.this, "12", Toast.LENGTH_SHORT).show();</code>
continues to show in every loop. Is there any way that this Toast shows after the looping is done?</p>
