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 sl: ABCD Enter string s2: BC substring of ABCD -

Enter JEnter BC is a Enter string sl: ABCD Enter string s2:

Enter string sl: ABCD Enter string s2: BC substring of ABCD - Enter JEnter BC is a Enter string sl: ABCD Enter string s2: BDC JEnter Enter BDC is not a substring of ABCD

Step by Step Solution

3.28 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Program Plan Create a class called CheckSubString Initialize the main method with variables Si s2 as ... View full answer

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 Java Programming Questions!