B

Bhagwan Das • 4.44K Points
Extraordinary

Q. What will be the output of the following Java program?
import java.lang.System;
class Output
{
public static void main(String args[])
{
byte a[] = { 65, 66, 67, 68, 69, 70 };
byte b[] = { 71, 72, 73, 74, 75, 76 };
System.arraycopy(a, 2, b, 3, a.length - 4);
System.out.print(new String(a) + " " + new String(b));
}
}

  • (A) ABCDEF ABCDEF
  • (B) ABCDEF GHIJKL
  • (C) ABCDEF GHIABC
  • (D) ABCDEF GHICDL
  • Correct Answer - Option(D)
  • Views: 18
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics