Question: JAVA HELP!!!!!! Q2. Write the full Method. Write the definition for the full method customSearch(). The method will accept two input parameters: a String called

JAVA HELP!!!!!! JAVA HELP!!!!!! Q2. Write the full Method. Write the definition for

Q2. Write the full Method. Write the definition for the full method customSearch(). The method will accept two input parameters: a String called littleString, and a String called bigString. Your method will search the String bigString for the first occurrence of littleString. Your method will return back an int representing the index position of where the String was found. If the String was not found, your method will return back a -1. Your method cannot use the .indexOf() or .contains() methods of the String class to accomplish this! You are implementing your own logic for this search. Example uses are below. Your method should be able to accept any two Strings, each of any length and contents! Examples: System.out.println(customSearch("hi", "bye hi sigh")); System.out.println(customSearch("fortnite", "monopoly scrabble jeopardy")); Outputs: -1

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!