(Common prefix) Write a method that returns the longest common prefix of two strings. For example, the longest common prefix of distance and disinfection is dis. The header of the method is:
If the two strings don’t have a common prefix, the method returns an empty string. Write a main method that prompts the user to enter two strings and displays their longest common prefix.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.