Single Choice Easy

QGive the output of the following program fragment:

// Give the output of the following program fragment:
class MCQClass {
	public static void main(String args[]){
		String s = new String("He went to the market");
		String r;
		r = s.replace("went", "is going");
		System.out.println(r);
	}
}

ID: #22213 Introduction in String Java 97 views
Question Info
#22213Q ID
EasyDifficulty
Introduction in String JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A He is going to the market
  • B He went to the market
Correct Answer

Explanation

No Previous Next Question

Share This Question

Challenge a friend or share with your study group.