Q. Identify the output of the following program.

Code:
String str = “Hellow”;
System.out.println(str.indexOf(‘t));
  • (A) 0
  • (B) 1
  • (C) true
  • (D) -1
πŸ’¬ Discuss
βœ… Correct Answer: (D) -1

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
382
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Chandrakant
Publisher
πŸ“ˆ
81%
Success Rate