A

Admin • 833K Points
Coach

Q. What will be the output of the following Java program?

Code:
class String_demo
{
public static void main(String args[])
{
int ascii[] = { 65, 66, 67, 68};
String s = new String(ascii, 1, 3);
System.out.println(s);
}
}
  • (A) ABC
  • (B) BCD
  • (C) CDA
  • (D) ABCD
  • Correct Answer - Option(B)
  • Views: 21
  • 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.