In this example we will see that how to convert string to array of character and retrieve elements from that character array one by one.
Description of the code:
1. First declare and initialize string.
2. use method toCharArray() to convert string to character array.
3. Retrieve character from character array one by one using for loop.
Here is the code of GetCharFromString
Output will be displayed as:
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: October 23, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles