Printing of array-valued elements

Paul Sandoz paul.sandoz at oracle.com
Mon Aug 3 19:40:14 UTC 2015


On 3 Aug 2015, at 21:31, Brian Goetz <brian.goetz at oracle.com> wrote:

> The toString() method on arrays is generally unhelpful (inherited from Object.)  Since jshell is a read-eval-PRINT loop, it might be nice to print the result of array-valued expressions in a friendlier manner, such as by using Arrays.toString(array) instead of array.toString(). (Might want to limit this to arrays of below a certain length.

Yes, please limit (i had also this noted down for another review round). It would be aesthetically pleasing to align the output to fit into an equal number of R rows for Math.min(R * C, MAX_CHARS);

Paul.

>  (Might want to allow that limit to be set by preferences.))
> 
> So we'd get
> 
> [ 1, 2, 3 ]
> 
> instead of
> 
> [I at 2048230
> 



More information about the kulla-dev mailing list