在我的程序中,我有以下数组字符串,当我处理程序时,输出有方括号 [],但我需要没有方括号 []。有关如何删除它们的任何建议?
private final static String[] l0 = {"az","Fh md Br", "Inr Gt Cn", "Bl Gs he St st", "Mae is a nw Get", "Pam is a Ml rm", "Comr lab Pl Mt hs", "za"};
public static String sfuffle()
{
List<String> shuffled = new ArrayList<String>(Arrays.asList(phraseString));
Collections.shuffle( shuffled );
System.out.println(shuffled);// added only to have the output
return shuffled + "\n";
}
输出:
[az, Mae is a nw Get, Bl Gs he St st, Fh md Br, za, Comr lab Pl Mt hs, Inr Gt Cn, Pam is a Ml rm]
我想要的输出是:
az, Mae is a nw Get, Bl Gs he St st, Fh md Br, za, Comr lab Pl Mt hs, Inr Gt Cn, Pam is a Ml rm