Ask Question
28 March, 13:18

What is output by the following code?

String q = "adjective";

String r = "stinky";

System. out. println (q. charAt (r. indexOf ('t')));

1. 1

2. 2

3. Index out of bounds exception

4. a

5. d

+4
Answers (1)
  1. 28 March, 15:34
    0
    R. indexOf ('t') is 1

    q. charAt (1) is d.

    It will output 5. d
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “What is output by the following code? String q = "adjective"; String r = "stinky"; System. out. println (q. charAt (r. indexOf ('t'))); 1. ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers