- A He is going to the market
- B He went to the market
String in java Introduction in String
⚠ Report ✓ Question Verified Copy Link
// 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); } }
Learn More MCQ Questions from String in java Introduction in String