將數組轉換爲List:
String[] ids = proHist.split("#");
//將ids轉化爲list集合
Collection<String> collection = Arrays.asList(ids);
將List轉換爲LinkedList:
LinkedList<String> list = new LinkedList<>(collection);
將LinkedList轉換爲String
//將linkedlist轉換爲string
StringBuffer sBuffer=new StringBuffer();
for (String string : list) {
sBuffer.append(string);
}
String result = sBuffer.toString();
result=result.substring(0, result.length());