First one is FirstNonRepeatedChar, the others are... special.
Sigiloso
REJECTED public class FirstNonRepeatedChar { public static char findChar(String s) { char[] string = s.toCharArray(); int i; int[] count = new int[256]; for (i = 0; i < string.length; i++) { count[string[i]]++; //new character found so increase counter at specified character value } //loop through the char array again and if the count is 1, then it is the first non-repeated character for (i = 0; i < string.length; i++) { if (count[string[i]] == 1) { return string[i]; } } return 0; } public static void main(String[] args) { for (String s : args) { char c = findChar(s); //if c is null, just print the word "null" (just printing c would print a blank) if (c == '\0') { System.out.println("null"); } else { System.out.println(c); } } } }