Question discussion

What will be the output?public class Test{ public static void main(String[] args){ int x=10, y=0; if(x && y){ System.out.print("TRUE"); } e…

288869Medium 2 replies 666 views
0
What will be the output?public class Test{ public static void main(String[] args){ int x=10, y=0; if(x && y){ System.out.print("TRUE"); } else{ System.out.print("FALSE"); } }}
  • AFALSE
  • BTRUE
  • CCompilation Error
  • DRuntime Error
Correct answer: C
0
CCommunity
Compilation Error

bad operand types for binary operator '&&'
if(x && y)
0
CCommunity
publicclassTest

{

inti = 10;

staticTest t;

publicstaticvoidmain(String[] args)



{

System.out.println(Test.t.t.t.t.t.t.ti);

}

}