Question: Can you please use loop to solve this question and add comment on each line please? Thank you. 2. Write down a program in Java,
Can you please use loop to solve this question and add comment on each line please? Thank you.

2. Write down a program in Java, which accepts two string inputs (string1 and string2) from the user. If the second string (string2) is present in first string (string1) (1.e., if the second string is a substring of first string), find out the number of times this string appears in the first string. Print the output saying "
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
