Ask your own question, for FREE!
Computer Science 18 Online
SourMunchkin7806:

What conclusion can be made about the state of the program when the while loop terminates? Assume answer is a declared and initialized String. while(answer.equals("N")) { // code not shown } The value of answer is N The value of answer is n or N The value of answer is not N The value of answer is Y Nothing can be determined

SourMunchkin7806:

@Ultrilliam

YoursTruly:

@Ultrilliam ):< Hyperdimension Neptunia is trash

YoursTruly:

@Ultrilliam Come to this post and fight me on it.

Ultrilliam:

I went to go eat lunch and come back to this... wth @YoursTruly

SourMunchkin7806:

lol

YoursTruly:

@Ultrilliam I needed to grab your attention. Did it work? LOL

mhchen:

So you know how the while loop will run until the condition is false? That means the while loop will terminate when answer.equals("N") is false Therefore the value of 'answer' will not be N when it terminates.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!