Solved

What Is the Output of the Following Code Snippet

Question 72

Multiple Choice

What is the output of the following code snippet?
Public static void main(String[] args)
{
String[] arr = { "aaa", "bbb", "ccc" };
Mystery(arr) ;
System.out.println(arr[0] + " " + arr.length) ;
}
Public static void mystery(String[] arr)
{
Arr = new String[5];
Arr[0] = "ddd";
}


A) ddd 5
B) ddd 3
C) aaa 5
D) aaa 3

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions