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.

icon
Related questions
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.
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
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer