java - clear spaces and special chars from Array.toString() -
this question has answer here:
i trying take out spaces, commas , square brackets of string, after using arrays.tostring(). when output string still has characters:
for(int c=0; c<10; c++){ temp[0] = a; temp[1] = b; temp[2] = c; string pass=arrays.tostring(temp); pass.replaceall("\\s+",""); system.out.println(pass); ...
this it:
string pass = arrays.tostring(temp); pass = pass.replaceall("[,\\s\\[\\]]", ""); system.out.println(pass);
Comments
Post a Comment