my assignment question is like that
Write a program which prints the letters in a char array in reverse order using
void printReverse(char
I believe what you wrote is the signature of the method you have to create.
public void printReverse(char[] letters, int size){
//code here
}
You would have to iterate the array and print what it contains backwards. Use a reverse "for loop" to go through each item in "letters". I'll let you combine these yourself as it's an assignment. Here's an example of a for loop:
for (int i = array.length-1; i >= 0 ; i--){
System.out.print(array[i]);
}