@@ -0,0 +1,826 @@
+package org.xander.katas;%0A%0Apublic class TestA %7B%0A    public char findFirstUnique(String s) %7B%0A        int number = -1;%0A        if (s.length() == 1) %7B%0A            return s.charAt(0);%0A        %7D%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A            if (i == 0%0A                    && i + 1 %3C s.length()%0A                    && s.charAt(i + 1) != s.charAt(i) ) %7B%0A                number = i;%0A                break;%0A            %7D%0A            if (i - 1 %3E= 0%0A                    && s.charAt(i - 1) != s.charAt(i)%0A                    && i + 1 %3C s.length()%0A                    && s.charAt(i + 1) != s.charAt(i)) %7B%0A                number = i;%0A                break;%0A            %7D%0A        %7D%0A        if (number %3C 0) %7B%0A            throw new IllegalArgumentException(%22no unique element%22);%0A        %7D%0A        return s.charAt(number);%0A    %7D%0A%7D%0A

find unique char in a string