write a program to find 1st non-repeating character from a string.
Utilisateur anonyme
private void findNonRepeatingCharacter(String str) { char[] arr = str.toCharArray(); for (char a : arr) { if (str.indexOf(a) == str.lastIndexOf(a)) { System.out.println(a + " is first non repeating char"); break; } } }