Q. How do you find the first index of a specified character in a string in Java?

  • (A) str.getFirstIndexOf(char)
  • (B) str.findFirst(char)
  • (C) str.indexFirst(char)
  • (D) str.indexOf(char)
πŸ’¬ Discuss
βœ… Correct Answer: (D) str.indexOf(char)

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
162
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Kiran Rapria
Publisher
πŸ“ˆ
87%
Success Rate