Time remaining:
Please help me and tell me whats wrong with this array

label Computer Science
account_circle Unassigned
schedule 1 Day
account_balance_wallet $5

public class Array1 {

public static int[] copyArray(int[] anArray){

int temp[] = new int[anArray.length];

temp = anArray;

return temp;

}

}

Oct 17th, 2017

hey check this code....there is no problem in this array... its working fine..!!

public class Array1 {

    //Please help me and tell me whats wrong with this array

public static int[] copyArray(int[] anArray){

    int temp[] = new int[anArray.length];

    temp = anArray;

    return temp;

}

public static void main(String args[]){

    Array1 o1 = new Array1();

    int data[] = new int[] {10,20,30,40,50,60,70,80,90,100 };

    int data1[] = new int[10];

    data1 = o1.copyArray(data);

     for(int i = 0; i<10;i++){

         System.out.println(data1[i]);

     }

   }

}


Apr 10th, 2015

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Oct 17th, 2017
...
Oct 17th, 2017
Oct 18th, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer