Q. Which method is used to find the index of the first occurrence of a specified character in a string in Java?

  • (A) findIndex()
  • (B) indexOf()
  • (C) search()
  • (D) findCharacter()
πŸ’¬ Discuss
βœ… Correct Answer: (B) indexOf()

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
165
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
86%
Success Rate