What will be the output of the following C# code snippet?
static void main(String args[])
{
char chars[] = {'x', 'y', 'z'};
String s = new String(chars);
Console.WriteLine(s);
}
static void main(String args[])
{
char chars[] = {'x', 'y', 'z'};
String s = new String(chars);
Console.WriteLine(s);
}
A. x
B. xy
C. z
D. xyz
Answer: Option D
Join The Discussion