Which of the following statements is not correct about the methods of the String class in Java?

  • OA lastIndexOf(char) returns the index of the specified character occurring last in the string. If the character is not found, the method returns -1.
  • OB concat() concatenates the specified string to the end of the string object.
  • OC trim() removes whitespace from both ends of a string object and returns the trimmed string.
  • OD The statement 'OD' is missing, so it cannot be determined whether it is correct or incorrect.
String Methods in Java: Identifying the Incorrect Statement

原文地址: https://www.cveoy.top/t/topic/oAQ4 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录