MultipleChoice
Given the code fragment:
int[] array = {1, 2, 3, 4, 5};
And given the requirements:
1. Process all the elements of the array in the order of entry.
2. Process all the elements of the array in the reverse order of entry.
3. Process alternating elements of the array in the order of entry.
Which two statements are true?
OptionsMultipleChoice
Given the following class declarations:
Which answer fails to compile?
OptionsMultipleChoice
Given the code fragment:
Which three code fragments can be independently inserted at line n1 to enable the code to print one?
OptionsMultipleChoice
Which two are benefits of polymorphism?
OptionsMultipleChoice
Given the following classes:
Which two options fail to compile when placed at line n1 of the main method?
OptionsMultipleChoice
Given:
And given the commands:
javac Test.java
java Test TRUE null
What is the result?
OptionsMultipleChoice
Given:
And given the code fragment:
Which two modifications enable the code to print the following output?
Canine 60 Long
Feline 80 Short
OptionsMultipleChoice
Given the code fragment:
Test.java
Which is the result?
OptionsMultipleChoice
Given the code fragment:
Which two modifications should you make so that the code compiles successfully?
OptionsMultipleChoice
Which three statements are true about the structure of a Java class?
Options