Question: 1 . You ask the user of the program to enter an apple name 2 . your program initializes a flag called foundIt to false.

1. You ask the user of the program to enter an apple name
2. your program initializes a flag called foundIt to false. foundIt is a Boolean data type which is Javas primitive data type. It is used to store only true and false values
3. your program searches the array for the requested apple name
4. if it is found, the flag is set is true
5. After the array search is completed, the flag is checked for true or false
6. If flag is true, message is send that the apple name was found in the array. if flag is not true, the program prints a message that informs the user the apple name is not found in the array

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!