title: Android: Is there any exceptions that would occur?
body: <p>I have used three check boxes, When button is clicked if all the three check boxes are checked it goes to <strong>if</strong> condition  or else it goes to <strong>else</strong> condition (i.e if one or two or no check box is checked) , I just wanted to know whether any exception occurs or not.
  CheckBox.java</p>
  
  <pre><code>import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.TextView;
  
  public class CheckBox extends Activity implements OnClickListener{
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.checkbox);
          Button btn =(Button) findViewById(R.id.btn);
          btn.setOnClickListener(this);
      }
  
      @Override
      public void onClick(View arg0) {
          TextView txt =(TextView) findViewById(R.id.txt);
           android.widget.CheckBox chk1 =(android.widget.CheckBox) findViewById(R.id.chk1);
           android.widget.CheckBox chk2 =(android.widget.CheckBox) findViewById(R.id.chk2);
           android.widget.CheckBox chk3 =(android.widget.CheckBox) findViewById(R.id.chk3);
           if (chk1.isChecked()==true&amp;&amp;chk2.isChecked()==true&amp;&amp;chk3.isChecked()==true) {
  
              txt.setText("selected locations are"+chk1.getText().toString()+","+chk2.getText().toString()+","+chk3.getText().toString());
  
          }
           else{
              txt.setText("select all locations");
           }
  
      }
  
  
  }
  </code></pre>