与えられる: public class MyClass { public static void main(String[] args) { String s = " Java Duke "; int len = s.trim().length(); System.out.print(len); } } 結果は何ですか?
正解:B
Java - String trim() Method This method returns a copy of the string, with leading and trailing whitespace omitted.