خرید بک لینک

Vote count: -2

public static void main(String[]args){
    //this program is to print the index values of an array in reversed order using 
    //another array
    int[]array1={5,6};
    int[]array2= new int[2];
    int i;
    int j=1;

    for(i=0;i<=1;i++){

        array1[i]=array2[j];
        j--;

    }
    for(int num: array1)
        System.out.println(num);

}

I am not getting the output of array2 by reversing the index value of array1 and storing it in array2. Can anybody tell me the reason?

asked 48 secs ago

برچسب: java reverse array values, نویسنده: استخدام کار تاريخ: دوشنبه 1 شهريور 1395 ساعت: 19:55

صفحه بندی