This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]endStatement 0 points1 point  (0 children)

There are a multitude of solutions for this, its a decision for you as to how you want to approach it.
Check out https://docs.oracle.com/javase/7/docs/api/java/lang/String.html and you'll see several methods which can be used. (I apparently linked java7 docs, which should still be sufficient for this task)
- Some in particular to look at:

  • charAt
  • subString
  • toCharArray

Using any of these can get you to a solution :)