I read that in Java, String is immutable, so we can t really use toLowerCase intuitively, i.e the original string is unmodified:
String s = "ABC";
s.toLowerCase();
> "ABC"
但是,即使使用StingBuffer(支持 mu强的强权)也行不通。
StringBuffer so = new StringBuffer("PoP");
so.toLowerCase()
> Static Error: No method in StringBuffer has name toLowerCase
我赞赏任何建议或建议。