Question: Which code would change the string sentence I dislike programming to I like programming? (make sure you have the space in the output string) int

Which code would change the string sentence I dislike programming to I like programming? (make sure you have the space in the output string)

int position = 5; sentence = sentence.substring(0, position ) + "dislike" + sentence.substring(position+ 4);
int position = 5; sentence = sentence.substring(0, position-1) + "dislike" + sentence.substring(position+4);
int position = 2; sentence = sentence. substring(0, position ) + "like" + sentence.substring(position+ 7);
int position = 2; sentence = sentence. substring(0, position-1 ) + "like" + sentence.substring(position+ 7);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!