Question

Find the first repeated character in a string
Example
Input Output
Apple p
Harris r
Solve the program on https://www.onlinegdb.com/online_java_compiler