Originally posted by Siegfried Heintze: Can someone help me understand why sun might think I would want to use java.io.console.readLine instead of BufferedReader.readLine()?
When I run this program and respond with my name I get Hello there [C@5483cd
Why is console.readLine() not returning what I typed?
I strongly advise you to read the javadocs as they will tell you all you need to know. In http://java.sun.com/javase/6/docs/api/java/io/Console.html you'll see that console.readPassword() returns a char array, not a string. Your output is the HashCode for that array. If you go through that array a char at a time, you'll see everything that was entered.