subject

1.When will the loop in the following code snippet stop? java. util. Scanner in = new java. util. Scanner(System. in); double sum = 0; int count = 0; System. out. print("Enter values, Q to quit: "); do { double value = in. nextDouble(); sum = sum + value; count++; System. out. print("Enter values, Q to quit: "); } while (in. hasNextDouble() && count < 100)

; I. When the user enters an integer

II. When the user enters an alphabetic character

III. After the user enters 100 numbers

Select one: a. I or II b. II only c. III only d. II or III

2.How many times does the following loop execute?

int upperCaseLetters = 0;
String str = "abcdEfghI";
boolean found = false;
for (int i = 0; i < str. length() && !found; i++)
{
char ch = str. charAt(i);
if (Character. isUpperCase(ch))
{
found = true;
}
}
Select one:

a. 9 times

b. 8 times

c. 5 times

d. 1 time

3.Which of the following statements is correct about a sentinel?

Select one:

a. A sentinel is a value that creates a bridge between a data set and unrelated input.

b. A sentinel is a value that is part of the data to be processed by the program.

c. A sentinel is a value that terminates a program.

d. A sentinel is a value that indicates the end of an input sequence.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
How many points do i need before i can send a chat
Answers: 1
question
Computers and Technology, 24.06.2019 10:30
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
You know the right answer?
1.When will the loop in the following code snippet stop? java. util. Scanner in = new java. util. Sc...
Questions
question
English, 12.11.2020 21:50
question
Mathematics, 12.11.2020 21:50
question
French, 12.11.2020 21:50
question
Mathematics, 12.11.2020 21:50
question
Mathematics, 12.11.2020 21:50