subject
Computers and Technology, 16.04.2021 19:30 s108870

Which of the following statements are true about the code shown below in the class named Quiz? (Select all that apply.) public class Quiz {
public static void printOdd(int n) {
for(int i = 0; i < n; i++){
if(i % 2 != 0)
System. out. println(i);
else
System. out. println(i+1);
}
}

public static void main(String arg[]) {
printOdd(5);
}
}

a. A value of 5 will be substituted for the parameter during the execution of the printOdd method.
b. This method will print a list of all even numbers less than n.
c. This method when executed as called by main will print out 5 lines of output.
d. This method when executed as called by main will print out 1 line of output.
e. A value of 5 is being returned to main from the printOdd method after execution.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:10
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
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 02:00
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
You know the right answer?
Which of the following statements are true about the code shown below in the class named Quiz? (Sele...
Questions
question
World Languages, 26.06.2021 14:00
question
Mathematics, 26.06.2021 14:00
question
English, 26.06.2021 14:00
question
Biology, 26.06.2021 14:00
question
English, 26.06.2021 14:00
question
Business, 26.06.2021 14:00
question
English, 26.06.2021 14:00
question
World Languages, 26.06.2021 14:00
Questions on the website: 13722361