我想打印从字符集合转换而来的字符串。但是我想从打印字符串中删除逗号(,)和方括号([])。将char的集合转换为不带逗号和方括号的字符串
List<Character> word_to_show = new ArrayList<Character>();
for(char ch:jumbled_word.toCharArray()){
word_to_show.add(ch);
}
Collections.shuffle(word_to_show);
for (Object ch: word_to_show)
System.out.print((Character) ch);
System.out.println();
send_to_timer = word_to_show.toString();
我已经到了。它的工作原理,但打印字符串作为,说的如[a, b, c]
你到目前为止尝试过什么?一般来说,当你被困时,这里的人都想**帮助**;但大多数人拒绝为你做所有的工作。 – GhostCat
我已经到了这里。它的工作原理,但打印字符串,例如[a,b,c] – ArhatBaid
当您被要求提供更多详细信息时,请更新您的问题。切勿将代码放入注释中。 – GhostCat