web123456

Upload local files to HDFS

Java String Question--Remove duplicate characters and sort them

Nova fission reply Her bad robot: //De-re-sorting the strings and sorting them //Convert characters and numbers at will @Test public void test2() { String s = "adfghdfdaer"; char[] sChars = (); //Define an array length 255 char[] chars = new char[255]; int temp;//temporary variable for (int i = 0; i < ; i++) { //sChars[i] AscII corresponding to each character temp = sChars[i];//This step will be heavy //Initialize the byte array chars[temp] default to 0 if(chars[temp] == 0){ chars[temp] = 1; } } //Sorting variable length strings StringBuffer sb = new StringBuffer(); //chars[temp] = 1;This step has saved the value for (int i = 0; i < ; i++) { if(chars[i] == 1){ ((char)i); // (i); } } (()); } This is my added note. I hope it can help those who come later. Thank you.