Created
April 5, 2017 02:33
-
-
Save AkhileshKumar01/d9087abbd467f94ff4c0c636303620d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package basicProgram; | |
import java.util.HashSet; | |
public class UniqueCharacterTest { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
String str = "Programming"; | |
HashSet<Character> set1= new HashSet<Character>(); | |
char [] arr= str.toCharArray(); | |
for (char ch : arr) { | |
set1.add(ch); | |
} | |
System.out.println(set1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment