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[]
Here's the method to achieve what you need:
public static void main(String[] args) { char[] arr= {'A','B','C','A','B'}; HashSet hset=new HashSet(); for(int i=0;i