Q. In Java, what is the purpose of the isEmpty() method of a String object?

  • (A) To check if the string is empty.
  • (B) To remove leading and trailing whitespace.
  • (C) To concatenate two strings.
  • (D) To reverse the string.
πŸ’¬ Discuss
βœ… Correct Answer: (A) To check if the string is empty.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
137
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Ravi Shankar
Publisher
πŸ“ˆ
99%
Success Rate