title: Android(Activity not working need help beginner)
body: <p>My app stops working when I include lines below:    </p>
  
  <pre><code>Button chkCmd = (Button) findViewById(R.id.bResults);
  ToggleButton passTog= (ToggleButton) findViewById(R.id.toggleButtonPass);
  EditText input = (EditText) findViewById(R.id.etCommands);
  TextView display = (EditText) findViewById(R.id.textViewResults);
  </code></pre>
  
  <p>but when its gone it works</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) 
  {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.subject);
  
      Button chkCmd = (Button) findViewById(R.id.bResults);
      ToggleButton passTog= (ToggleButton) findViewById(R.id.toggleButtonPass);
      EditText input = (EditText) findViewById(R.id.etCommands);
      TextView display = (EditText) findViewById(R.id.textViewResults);
  }
  </code></pre>
  
  <p>can anyone one see a problem in the above</p>