Solved

Is the Following Code Snippet Legal? Boolean B = False;

Question 67

Multiple Choice

Is the following code snippet legal? boolean b = false;
Do
{
System.out.println("Do you think in Java?") ;
}
While (b !=B) ;


A) Yes, it is legal but does not print anything.
B) Yes, it is legal and prints "Do you think in Java?" once.
C) Yes, it is legal and prints "Do you think in Java?" twice.
D) No, it is not legal and gives a compilation error.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents