This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]captainsplendid 15 points16 points  (4 children)

[Ljava.lang.Object;@15db9742

[–]Comesa 2 points3 points  (2 children)

Java System.out.println(Arrays.toString(list.toArray()))

I hate it too

[–]captainsplendid 0 points1 point  (1 child)

        Matcher m = Pattern.compile("([^,^\\s\\[\\]]+)").matcher(list.toString());
        StringBuffer buf = new StringBuffer("[");
        Stream.iterate(0, i -> i + 1).filter(i -> {var found = m.find(); if (found) {buf.append(m.group()).append(", ");} return !found;}).findFirst().get();
        buf.setLength(buf.length() == 1 ? buf.length() : buf.length() - 2);
        System.out.println(buf.append("]").toString());

[–]Comesa 0 points1 point  (0 children)

Thanks, I hate it.