πŸ“Š JAVA
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]);
}
  • (A) 6
  • (B) 7
  • (C) 8
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 7

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
313
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
99%
Success Rate