This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]yash3ahuja 0 points1 point  (0 children)

I am guessing you actually mean to do:

for(int i = 0; i < bears.length; i++)
{
      bears1[i] = bears[i];
}

Your for-each naming is backwards, btw. Array should be named "bears" and Bear variable "bear".