A
Q. What is the output of Java code snippet?
Code:
int[] ary = {5,6,7,8};
if(ary.length > 2)
{
System.out.println(ary[2]);
}
if(ary.length > 2)
{
System.out.println(ary[2]);
}
- Correct Answer - Option(B)
- Views: 7
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.