Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import java.util.Arrays;

public class Main {
    public static float[] reverse(float[] array) {
        float[] result = Arrays.copyOf(array, array.length);
        for (int i = 0; i < result.length / 2; i++) {
            float temp = result[i];
            result[i] = result[result.length - i - 1];
            result[result.length - i - 1] = temp;
        }
        return result;
    }
}