I am attempting to get my generate new name project to output the name
it creates. My generateNewName method outputs the new name as a char
array.
Behold two lines of code-
System.out.print("New name: " + generateNewName(args));
System.out.print(generateNewName(args));
The former outputs "New name: [...@3e25a5"
The latter outputs the actual name (in this case, lola).
Why do these (which both appear to call the same method with the same
parameters) output different results? I assume that the former is a
memory reference. How do I make it work (better)?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---