A

Admin • 828.03K Points
Coach

Q. What will be the output of the following Java code?
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 , 0, b, 0, a.length);
System.out.print(new String(a) + " " + new String(b));
}
}

  • (A) ABCDEF ABCDEF
  • (B) ABCDEF GHIJKL
  • (C) GHIJKL ABCDEF
  • (D) GHIJKL GHIJKL
  • Correct Answer - Option(A)
  • Views: 10
  • Filed under category Java
  • Hashtags:

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.