πŸ“Š JAVA
Q. What is the purpose of the trim() method of a String object in Java?
  • (A) To remove all spaces from the string
  • (B) To concatenate two strings
  • (C) To extract a substring from the string
  • (D) To remove leading and trailing whitespace
πŸ’¬ Discuss
βœ… Correct Answer: (D) To remove leading and trailing whitespace

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
195
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Vinay
Publisher
πŸ“ˆ
89%
Success Rate