Question: portion of a string ) with another substring. You will first need to create a class named Program 3 . Within this class, you will
portion of a string with another substring.
You will first need to create a class named Program Within this class, you will be reading three pieces of user input, each on distinct lines: the string that you will be manipulating, string, the substring to replace, find, and then what you will be replacing it with, replace. The block below shows the formatting of this input.
string
find
replace
With these three pieces of input, you will utilize the Java replace method and output the manipulated string. If the specified string to be replaced does not exist, nothing will be changed.
As usual, this line should terminate in a new line. To further your understanding of these requirements, refer to the sample test cases below.
Submit your program Program java to Gradescope. Make sure there are no packages at the top of your program. If there are, delete or comment them out.
Sample Test Cases
You can test your program by copying an entire input sample and pasting it into the console. If the output does not exactly match the example output, there is an error in your code.
Input
The cake is a lie lie pie
Output
The cake is a pie
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
