subject

Identify the logic error in the code below. The code is supposed to display a single message “child”, “adult” or “senior” for any value of age: if (age < 18) {
System. out. println("child");
} else if (age >= 18) {
System. out. println("adult");
} else if (age > 65) {
System. out. println("senior");
}
Question 1 options:

a)

no message for age = 65

b)

too many messages for age = 18

c)

no message for age < 65

d)

message “senior” will never be displayed

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:30
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
question
Computers and Technology, 23.06.2019 22:00
Technician a says engine assemblies can be mounted longitudinally in a chassis. technician b says engine assemblies can be mounted transversely in a chassis. who is correct?
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
How does the use of e-mail benefit business communications? it can be sent at any time. it is faster than regular mail. it improves writing skills. it is less expensive than using a courier. it reduces the need for proofreading.
Answers: 1
You know the right answer?
Identify the logic error in the code below. The code is supposed to display a single message “child”...
Questions
question
Mathematics, 20.09.2021 23:30
question
History, 20.09.2021 23:30
question
Business, 20.09.2021 23:30
question
Mathematics, 20.09.2021 23:40
question
English, 20.09.2021 23:40
question
Chemistry, 20.09.2021 23:40
Questions on the website: 13722362