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 , 0, B, 0, A.length); 6. System.out.print(new String(a) + " " + New String(b)); 7. } 8. }

Answer»

SYSTEM.arraycopy() is a method of CLASS System which is USED to COPY a string into another string.

Output:

$ javac Output.JAVA
$ java Output
ABCDEF ABCDEF

System.arraycopy() is a method of class System which is used to copy a string into another string.

Output:

$ javac Output.java
$ java Output
ABCDEF ABCDEF



Discussion

No Comment Found

Related InterviewSolutions