Java Array Reverse reverseArray(Object[] arr)

Here you can find the source of reverseArray(Object[] arr)

Description

reverse Array

License

Open Source License

Declaration

public static Object[] reverseArray(Object[] arr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class Main {
    public static Object[] reverseArray(Object[] arr) {
        List<Object> list = Arrays.asList(arr);
        Collections.reverse(list);

        return list.toArray();
    }//w  ww  .j  av a2s  .com
}

Related

  1. reverse(T[] array)
  2. reverse(T[] array)
  3. reverse(T[] array)
  4. reverse(T[] originalArray)
  5. reverseArray(final T[] arr)
  6. reverseArray(T[] arr)
  7. reverseArrayList(ArrayList listIn)
  8. reverseList (ArrayList l)
  9. reverseRange(final T[] arr, final int from, final int to)

  10. HOME | Copyright © www.java2s.com 2016