Question: Write a program that prompts the user to enter two strings, and reports whether the second string is a substring of the first string. Enter
Write a program that prompts the user to enter two strings, and reports whether the second string is a substring of the first string.
Enter string s1: ABCD
Enter string s2: BC
BC is a substring of ABCD
Enter string s1: ABCD
Enter string s2: BDC
BDC is not a substring of ABCD
Step by Step Solution
3.34 Rating (172 Votes )
There are 3 Steps involved in it
import javautilScanner public class Exercise0422 public static void mainStr... View full answer
Get step-by-step solutions from verified subject matter experts
