A

Admin • 832.27K Points
Coach

Q. What is the output of the Java code snippet?

Code:
int k=20;
if(k)
{
System.out.println("YES");
}
else
{
System.out.println("NO");
}
  • (A) NO
  • (B) YES
  • (C) Compiler error
  • (D) None of the above
  • Correct Answer - Option(C)
  • Views: 23
  • 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.