Question: JAVA 21. What is the line of code to declare and create a generic array. (case and spelling matter- name the array, array) Use T

JAVA

21. What is the line of code to declare and create a generic array. (case and spelling matter- name the array, array) Use T for the generic placeholder.

22What is the order of the following growth function? t(n)= 5nlogn + 20n - 4

O(lg n)

O(n^2)

O(1)

O(nlg (n)

23. The following code segment has ______ time complexity?

for(int i = 0; i < n; i++){

for(int j = 0; j < n: j=j*2){

int val = (j*i);

System.out.println(val)

}

}

O(n)
O(n^2)
O(1)

O((n lg n)

24. The versions of an overloaded method are distinguished by their ___________. The number, type, or order of their parameters must be distinct.

headers
none of the above
signatures

documentation

25. Visibility modifiers determine which variables and methods are inherited. ___________ visibility provides the best possible encapsulation that permits inheritance.

package
public
private
protected

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!