Answer to Question #268012 in Java | JSP | JSF for Candy

Question #268012

What does the following fragment display? (


) class MyClass

{

public static void main(String[] args) {

boolean b = true; int i = 2;

do

{

i++;

b = !b; } while (b);

System.out.println(i); }

}



1
Expert's answer
2021-11-21T04:58:15-0500

output: 3


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS