how to extract character by character in java
Answers
Answered by
2
Create an empty char array of size 1. Copy the element at specific index from String into the char[] using String. getChars() method.
...
Using String. charAt() method:
- Get the string and the index.
- Get the specific character using String. charAt(index) method.
- Return the specific character.
Similar questions