Question: Use this method when answering the next 2 questions. public static int theValue ( ) { boolean notDone = true; int foundIt = - 9
Use this method when answering the next questions.
public static int theValue
boolean notDone true;
int foundIt ;
do
System.out.printEnter score: ;
int cntScore getInt; assume getInt is defined to obtain an integer input from the user using a Scanner object
if cntScore
if cntScore && cntScore
if cntScore foundIt
foundIt cntScore;
else
notDone false;
while notDone true;
return foundIt;
What is the sentinel value used in this method?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
