Strange Coder

Strange Coder Strange coder is a platform to learn about the technical languages

Reverse Array : Reverse the given array by using temporary variable. Input : 50, 40, 30, 20, 10 Output : 10, 20, 30, 40,...
31/12/2021

Reverse Array : Reverse the given array by using temporary variable. Input : 50, 40, 30, 20, 10 Output : 10, 20, 30, 40, 50 /** * StrangeCoder */ public class ReverseArray { private static void reverse(int[] array, int length) { int reverseArray[] = new int[length]; int j = length; for (int i = 0; i < length; i++) { reverseArray[j-1] = array[i]; j = j - 1; } System.out.println("Printing reversed array : \n"); for (int i = 0; i < reverseArray.length; i++) { System.out.println(reverseArray[i]); } } public static void main(String[] args) { int array[] = {50, 40, 30, 20, 10}; reverse(array, array.length); } } …...

Reverse Array : Reverse the given array by using temporary variable. Input : 50, 40, 30, 20, 10 Output : 10, 20, 30, 40, 50 /** * StrangeCoder */ public class ReverseArray { private static …

12/07/2021

Giving people the power to share and learn our experience.

Address

Chennai

Alerts

Be the first to know and let us send you an email when Strange Coder posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share