Question
Write a Java program to find the first non-repeating character in a given string and return its index.
If there is no such character, return -1.
expand button
Transcribed Image Text:Write a Java program to find the first non-repeating character in a given string and return its index. If there is no such character, return -1.
Expert Solution
Check Mark