title: how to convert Lower case letters to upper case letters & and upper case letters to lower case letters
body: <p>Alternately display any text that is typed in the textbox </p>
  
  <pre><code>//     in either Capital or lowercase depending on the original
  //     letter changed.  For example:  CoMpUtEr will convert to
  //     cOmPuTeR and vice versa.
      Switch.addActionListener(new ActionListener()
      {
          public void actionPerformed(ActionEvent e )
  
              String characters = (SecondTextField.getText()); //String to read the user input
              int length = characters.length();  //change the string characters to length
  
           for(int i = 0; i &lt; length; i++)  //to check the characters of string..
           {             
              char character = characters.charAt(i);          
  
              if(Character.isUpperCase(character)) 
              {
                  SecondTextField.setText("" + characters.toLowerCase());
  
              }
              else  if(Character.isLowerCase(character))
              {
                   SecondTextField.setText("" + characters.toUpperCase()); //problem is here, how can i track the character which i already change above, means lowerCase**
                  }               
           }}     
      });
  </code></pre>