Ask Question
11 May, 16:58

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

+2
Answers (1)
  1. 11 May, 19:03
    0
    R. indexOf ('t') is 1

    q. charAt (1) is d.

    It will output 5. d
Know the Answer?
Not Sure About the Answer?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers