his is a tricky question because String is a sequence of characters, so we can’t convert it to a single character. We can use use
Check this post for sample program on converting String to character array to String.
charAt
method to get the character at given index or we can usetoCharArray()
method to convert String to character array.Check this post for sample program on converting String to character array to String.
No comments:
Post a Comment