Answers for "Declare and implement a function called reversePrint. You should accept a single array of char values as your only argument, and print that array backwards, one character on each line. Your function should return the length of the array as an int."

13

reverse array in java

int length = array.length;
		for(int i=0;i<length/2;i++) {
			int swap = array[i];
			array[i] = array[length-i-1];
			array[length-i-1] = swap;
		}
or
Collections.reverse(Arrays.asList(array));
Posted by: Guest on May-10-2020

Code answers related to "Declare and implement a function called reversePrint. You should accept a single array of char values as your only argument, and print that array backwards, one character on each line. Your function should return the length of the array as an int."

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language