title: Java - explanation for using " | "?
body: <p>I am new to android and learning java. In recent guide, i came across the method to toggle password field to normal text field.</p>
  
  <p><strong>Can someone please explain use of <code>|</code> in this statement ?</strong> </p>
  
  <pre><code>final EditText input = (EditText) findViewById(R.id.etCommands);
  
  if(passTog.isChecked())
  {
     input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
  }else {
     input.setInputType(InputType.TYPE_CLASS_TEXT);
  }
  </code></pre>
  
  <p>Any help regarding this will be much appreciated. Thanks in advance.</p>
  
  <p>Edit: </p>
  
  <p><em>I need to know how this</em> <strong>Bitwise OR</strong> <em>is working infact here ?</em>
   Here is complete code to avoid ambiguity regarding the variables:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.text);
  
      Button checkCommand = (Button)findViewById(R.id.bResults);
      final ToggleButton passTog = (ToggleButton) findViewById(R.id.tbPassword);
      final EditText input = (EditText) findViewById(R.id.etCommands);
      TextView display = (TextView) findViewById(R.id.tvResults);
  
      passTog.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View arg0) {
              // TODO Auto-generated method stub
  
              if(passTog.isChecked()){
                  input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
              }else {
                  input.setInputType(InputType.TYPE_CLASS_TEXT);
              }
  
          }
      });
  
  }
  </code></pre>