IntSummaryStatistics () { IntSummaryStatistics stat = new IntSummaryStatistics(); for (int limit = 0; limit < 20; limit++) { long limitInner = limit; for (String x = ""; ; x = x + limit) { if (limitInner-- == 0) break; int length = x.length(); stat.accept(length); } } return stat; }