Class name: CompareSubstring
Method name: findLongest
Find the longest common substring between the two passed Strings. The
substring can be any part of the String, including the entire String. If there
is no common substring, return 0. The search IS case sensitive ('x' != 'X').
Here is the method signature (Be sure your method is public):
int findLongest(String s1, String s2);
Both input Strings will contain between 1 and 50, inclusive, letters (a-z,
A-Z), and/or spaces.
The length of the longest common substring between the two Strings.
Input: "abcdef" "cdofhij"
Since the longest substring present in both words is "cd", the output is 2.
Input: "TWO" "FOUR"
Input: "abracadabra" "open"
Input: "Hey This java is hot" "Java is a new paradigm"
Output: 7 (longest substring - "ava is ")