Skip to content
3 marksDifficulty: Medium

What is the output of: String s = "Programming"; System.out.println(s.indexOf('g') + " " + s.lastIndexOf('g') + " " + s.replace('g', 'G'));

Original Khojo Papers practice question — not from a past board paper.

Practise this chapter

Answer

Related questions

From the same topic and chapter, at a similar level.

Related questions