nerdexam
Oracle

1Z0-815 · Question #79

Given: Which would cause s to be AQCD?

The correct answer is C. s.replace(s.indexOf("B"), s.indexOf("B"), "Q"). See the full explanation below for the reasoning.

Question

Given:

Which would cause s to be AQCD?

Options

  • As.replace(s.indexOf("A"), s.indexOf("C"), "Q");
  • Bs.replace(s.indexOf("B"), s.indexOf("C"), "Q");
  • Cs.replace(s.indexOf("B"), s.indexOf("B"), "Q");
  • Ds.replace(s.indexOf("A"), s.indexOf("B"), "Q");

How the community answered

(31 responses)
  • A
    13% (4)
  • B
    3% (1)
  • C
    77% (24)
  • D
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-815 Practice