I have a char array filled by the user (arrayInput[]) with some characters, like {b, d, a, b, f, a, g, a, a, f}, and I need to create a method which returns a new c
arrayInput[]
This might help. Make a separate array and store only non-duplicate characters.
char[] removeDuplicates (char[] arrayInput) { boolean exists[]=new boolean[26]; char arrayOutput[] = new char[26]; int ctr=0; for(int i=0; i<26; i++) { exists[i] = false; } for(int i=0; i