Q. After the following code fragment, what is the value in a?~~~String s; int a;~~~s = "Foolish boy."; a = s.indexOf("fool");

  • (A) -1.
  • (B) 0.
  • (C) 4.
  • (D) random value.
πŸ’¬ Discuss
βœ… Correct Answer: (A) -1.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
175
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
99%
Success Rate