X338: reverseStringToArray

Given a String, return an array of char values that contains the characters of the string in reverse order. For example, if the string is "Java", the resulting array will contain the characters {'a', 'v', 'a', 'J'}.

Examples:

reverseStringToArray("Java") -> {'a', 'v', 'a', 'J'}
reverseStringToArray("This is a test.") -> {'.', 't', 's', 'e', 't', ' ', 'a', ' ', 's', 'i', ' ', 's', 'i', 'h', 'T'}

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.