Question: Write a Java program from scratch that meets the following requirements: a. The program is in a file called Matching.java that defines a class called


Write a Java program from scratch that meets the following requirements: a. The program is in a file called Matching.java that defines a class called Matching. b. The program includes a Java method called find that takes two Strings and returns an integer. If the second string does not appear in the first string, find returns -1. If the second string appears in the first string, find returns the index of the character where the second string begins in the first string. Make sure the method is public static. example tests: find("","") returns find("", "a") returns -1 find("Hello World", "World") returns 6 find("World", "Hello World") returns -1 find("Hello World", "lo W") returns 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
