Java-Program to reverse upper case and lower case
<p>I have to write a program to input a String str and change the upper case to lower case and vice versa. For example: </p>

<p><strong>input:</strong>
"abCD"</p>

<p><strong>output:</strong>
"ABcd"</p>

<p>this is what I've got:</p>

<p>l-is the length of the string</p>

<pre><code>for(int b=0;b &lt; l;b++)

             {

               char let=str.charAt(b);

               if(let&gt;97 &amp;&amp; let&lt;122)

               {char nlet=let-32;

               System.out.print(nlet);

            }
            else if(let&gt;65 &amp;&amp; let&lt;90)
             { char t=let+32;
              System.out.print(t);
            }
           }
           break; 
        }
</code></pre>

<p>the error coming for this line:"<code>char nlet=let-32;</code>" is:
required:char;found:int;</p>

<p>how do i fix this?</p>
