Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 51
    @voo, but i doubt you'd log via direct writing to stream and concatenation. logging framework would transform the char[] into good output Commented Jan 18, 2012 at 1:14
  • 50
    @Thr4wn Default implementation of toString is classname@hashcode. [C represents char[], the rest is hexadecimal hash code. Commented Jan 20, 2012 at 12:39
  • 22
    Interesting idea. I would like to point out that this does not transpose to Scala which has a meaningful toString for arrays. Commented Jul 9, 2015 at 8:36
  • 49
    I'd write a Password class type for this. It's less obscure, and harder to accidentally pass somewhere. Commented Aug 31, 2015 at 17:32
  • 14
    @g.rocket The hashcode for an array does not depend on the contents of the array, it is effectively random: Online Example Commented Jul 12, 2017 at 0:03