Write a java programe to reverse an array .

 // Write a java programe to reverse an array .

public class nilesh {

    public static void main (String args[]){

        int [] revers ={1,2,3,4};

        

        for (int i=3; i>=0; i--){

            System.out.print(revers[i]+" ");

            }

}}

Comments

Popular posts from this blog

Create an array of 5 floats and calculate their sum in java .