Question: Write a program that prompts the user to enter 2 strings and reports whether the second string is a substring of the first string. Enter

Write a program that prompts the user to enter 2 strings and reports
whether the second string is a substring of the first string.
Enter string s1: ABCD [Enter]
Enter string s2: BC [Enter]
BC is a substring of ABCD
Enter string s1: ABCD [Enter]
Enter string s2: BDC [Enter]
BDC is not a substring of ABCD
In Java Please!

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!