Error in conversion of upper and lower cases
Error in conversion of upper and lower cases Below code is to convert upper case to lower case and vice vers? if(s1.charAt(i)>=97 && s1.charAt(i)<=122){ s1.charAt(i)=s1.charAt(i)-32; } else if(s1.charAt(i)>=65 && s1.charAt(i)<=90){ s1.charAt(i)=s1.charAt(i)+32; } Please refer above and help what is the issue with this program? Possible duplicate of Replace character in StringBuilder – Shubhendu Pramanik Jun 29 at 10:08 what is s1 ? a String ? String is immutable, cannot be changed; anyway charAt is a method that returns a char, you cannot assign a new value to that returned value. – Carlos Heuberger Jun 29 at 10:15 s1 String charAt ...
