Saturday, 16 March 2013

MCQ #7

Question) Can you compare boolean to an integer?


  • True
  • False
Answer) False

Explanation)   In Java boolean has value true or false and not 1 or 0 or anything else. So you just can't do it(Watch out C folks!).

No comments:

Post a Comment

t> UA-39527780-1 back to top