Java中字符串大小写转换
操作方法
- 01
public class TestCaculation { public static void main(String[] args) { String str = args[0]; char[] ch = str.toCharArray(); for (int i=0;i<ch.length;i++){ ch[i] = (char)((ch[i]+(ch[i]/97)*59+32)%123); } System.out.println(new String(ch)); }}
赞 (0)