String to char array in Java

Converting a String to primitive character array in Java, use the following:

String number = "1234567890";
char [] charArray = number.toCharArray();

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>