Question: solve in java, and solve exactly like showed in picture using the exception Input Specification: Inputt: an input string input2: a string containing the character

solve in java, and solve exactly like showed in picture using the exception  solve in java, and solve exactly like showed in picture using
the exception Input Specification: Inputt: an input string input2: a string containing

Input Specification: Inputt: an input string input2: a string containing the character for which the distance has to be calculated Language: JAVA11- Compler son 1 import java.io. 2 import java.util. 1/ Read only region start class UserMainCode + 5 6 7 8 Output Specification: Return the number of distinct characters that exist 20 public int Searchetteristrim // Read only region and // Write code here.. throw new Unsupportedoper Example 1: input1: my name is granar Input2: a 12 13 3 Output: 7 Explanation: The largest substring that contains all the occurrences of 'a' is 'ame is grana', and the distinct characters between the two occurrences of 'a' are-m, e, i, s, p, r, and n. Example 2: input1: the capital of minnesota is saint paul input2: y Output: -1 Code Results Your Testcase Explanation: The character y does not occur in the given string. Thus the output is -1. Console Output: 91.82878- 4 Language: JAVA11 - Compiler: Java - 11 1 import java.io. 2 import java.util.. 3 // Read only region start 5 class UserMaincode 6 { 7 8 public int SearchLetter(String input1, string input24 9 // Read only region end 10 // Write code here... 11 throw new UnsupportedOperationException("Searchletter(String input1, String input21) 12 } 13 } Comple

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!