KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When I run the following code, nothing gets copied - what am I doing wrong? Also, is this the best/most efficient way to copy data from one array to another? public class A { public static void main(String args[]) { int a[] = { 1, 2, 3, 4, 5, 6 }; int b[] = new int[a.length]; for (int i = 0; i < a.length; i++) { a[i] = b[i]; } } }
Tags (comma-separated)
Save Edits
Cancel