Académique Documents
Professionnel Documents
Culture Documents
Section 6
(Answer all questions in this section)
21. Which of the following declares a one dimensional array name scores of
int scores;
int[] scores=new int[14]; (*)
int[] scores=new scores int[14];
int score= new int[14];
23. Which of the following declares and initializes a one dimensional array t
int number[];
float []averages;
double marks[5];
counter int[]; (*)
Correct
Selection Sort
Merge Sort
Bubble Sort (*)
Sequential Search
Binary Search
Previous
Next
Page 5 of 10
Test: Java Fundamentals Final Exam
Summary
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 6
(Answer all questions in this section)
26. Which of the following is the correct lexicographical order for the conen
{17, 1, 1, 83, 50, 28, 29, 3, 71, 22}
{71, 1, 3, 28,29, 50, 22, 83, 1, 17}
{83, 71, 50, 29, 28, 22, 17, 3, 1, 1}
{1, 1, 17, 22, 28, 29, 3, 50, 71, 83}
{1, 2, 7, 0, 9, 5, 6, 4, 8, 3}
{1, 1, 3, 17, 22, 28, 29, 50, 71, 83} (*)
Correct
27. Which searching algorithm involves using a low, middle, and high index
Sequential Search
Merge Sort
Selection Sort
Binary Search (*)
All of the above
True (*)
False
True
False (*)
Correct
21.Which of the
following is the
correct
lexicographical
order for the
conents of the int
array?
Mark for
Review
(1) Points
True
False (*)
Incorrect. Refer to Section 6
Lesson 2.
23. Of the options below, what is the fastest run-time?
Mark for
Review
(1) Points
n
n^2
lg(n) (*)
n*lg(n)
Incorrect. Refer to Section 6
Lesson 2.
24. Why might a sequential search be inefficient?
Mark for
Review
(1) Points
Mark for
Review
(1) Points
initializes
a one
dimensio
nal array
named
words of
size 3 so
that all
entries
can be
Strings?
String strings=new String[3];
String[] word={"Over","the","mountain"}; (*)
String[] word=new String[3];
String[] words={"Oracle","Academy"}];
Incorrect. Refer to Section 6 Lesson 1.
27. The following array declaration is valid. True or false?
int k[] = new int[10];
True (*)
False
Incorrect. Refer to Section 6 Lesson 1.
28. What will be the content of the array variable table after executing the following
code?
111
011
001
100
010
001
100
110
001
010
100
Correct
29. It is possible to throw and catch a second exception inside a catch block of code.
True or false?
True (*)
False
Incorrect. Refer to Section 6 Lesson 3.