京东自营 618 + 国补 iPhone 历史最低价

Java 字符串方法替换,toLowerCase,toUpperCase,trim和toCharArray。

字符串方法替换,toLowerCase,toUpperCase,trim和toCharArray。
实例源码:
源代码:
执行
执行中...
执行结果:
  • s1 = hello
  • s2 = GOODBYE
  • s3 = spaces
  • Replace 'l' with 'L' in s1: heLLo
  • s1.toUpperCase() = HELLO
  • s2.toLowerCase() = goodbye
  • s3 after trim = "spaces"
  • s1 as a character array = hello
  •  
    本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。

    编辑于

    关注时代Java

    关注时代Java