Question 6
You have the following code:
You need to create an int array named numbers initialized with num1, num2, and num3.
How should you complete the code? To answer, drag the appropriate code segment to the correct position. Each code segment may be used once, more than
once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Correct answer: To work with this question, an Exam Simulator is required.
Explanation:
Example:int[] numbers = new int[] {num1, num2, num3} References:https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.htmlhttps://alvinalexander.com/blog/post/java/java-faq-create-array-int-example-syntax
Example:
int[] numbers = new int[] {num1, num2, num3}
References:
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
https://alvinalexander.com/blog/post/java/java-faq-create-array-int-example-syntax