Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

String.toCharArray() problemo

807600Jul 26 2007 — edited Mar 17 2008
Hello, I am trying to convert a String to an array of char's so that I can manipulate each char without using String.charAt for every single character. My problem is that the toCharArray() method doesn't seem to be functioning properly.

For example,
String input = "BOBOBOBOBO";
char inArray[] = input.toCharArray();
I get this as my output:

INPUT: BOBOBOBOBO
INARRAY: [C@89ae9e

any ideas??? Thanks,
dub
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2008
Added on Jul 26 2007
23 comments
829 views