1.

What Is The Output Of This Program? 1. Class Output { 2. Public Static Void Main(string Args[]) { 3. Byte A[] = { 65, 66, 67, 68, 69, 70 }; 4. Byte B[] = { 71, 72, 73, 74, 75, 76 }; 5. System.arraycopy(a, 1, B, 3, 0); 6. System.out.print(new String(a) + " " + New String(b)); 7. } 8. }

Answer»

SINCE last PARAMETER of System.arraycopy(a,1,b,3,0) is 0 NOTHING is COPIED from array a to array b, hence b REMAINS as it is.

Since last parameter of System.arraycopy(a,1,b,3,0) is 0 nothing is copied from array a to array b, hence b remains as it is.



Discussion

No Comment Found

Related InterviewSolutions