16. Which of the following statements is true? a. An interface effectively has the exact same functionality as a java class b. An interface is like a blueprint - any class implementing an interface must implement all the functions defined in an interface c. It is possible to have concrete function definitions inside an interface d. A class can not implement more than one interface 17. Does Java use call by value or call by reference in function calls? a. Call by reference b. It depends on the context c. Call by value 18. What is the main use case of getter and setter functions in a Java classes? a. It is mandatory to have them in a Java class. b. Setting and retrieving values of variables using getters and setters is faster than directly accessing the variables. c. They allow us to get and set the values for variables declared as private. d. None of the above do gninnet:

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter14: Exception Handling
Section: Chapter Questions
Problem 10SA
icon
Related questions
Question
O
©
G
(
Ⓒ
>
D
B
Ⓒ
(F
>
D
B
34
85
D
D
B
B
C
G
91
92
93 D
94 D
95 D
(B
B
96
97 D
98
B
B
B
16. Which of the following statements is true?
Ⓒ
(B
B
B
17. Does Java use call by value or call by reference in function calls?
a. Call by reference
b. It depends on the context
c. Call by value
18. What is the main use case of getter and setter functions in a Java classes?
a. It is mandatory to have them in a Java class.
b. Setting and retrieving values of variables using getters and setters is faster than
directly accessing the variables.
c.
They allow us to get and set the values for variables declared as private.
d. None of the above
a. An interface effectively has the exact same functionality as a java class
b. An interface is like a blueprint - any class implementing an interface must
implement all the functions defined in an interface
c. It is possible to have concrete function definitions inside an interface
d. A class can not implement more than one interface
19. Consider the following code snippet:
List<String> list = new LinkedList<String>();
(CC)
©
(
D
@
Ⓒ
list.add("Ronald");
list.add("Mary");
list.add("Samuel");
list.add("Amélie");
Iterator<String> i = list.
while (i.
C
C
O
2
System.out.println(i.
}
What is the correct way of filling blanks 1, 2, and 3 so that the list of names is printed.
a.
1 > elements()
2 -> empty()
3 -> next()
b. 1 > iterator()
2 -> hasNext()
3 -> next()
c. 1 > iterator()
2 -> next()
3-> nextElement()
d. 1 -> iterator()
2 -> more()
3 ->get()
(D
C
E
E
O
D
(D)
D
(E)
E
(E)
(E)
E
3
161
162
163
164
165
166
167
168
(B)
(B
(B)
(B)
B
B
(B)
B
Ⓒ
C
C
(C
(C)
C
C
Ⓒ
9@
(D
(D)
(D)
(D)
(D
D
O
D
B
Co
E
(E)
(E)
(E
(E.
(E)
(E)
AIIIIIII
Transcribed Image Text:O © G ( Ⓒ > D B Ⓒ (F > D B 34 85 D D B B C G 91 92 93 D 94 D 95 D (B B 96 97 D 98 B B B 16. Which of the following statements is true? Ⓒ (B B B 17. Does Java use call by value or call by reference in function calls? a. Call by reference b. It depends on the context c. Call by value 18. What is the main use case of getter and setter functions in a Java classes? a. It is mandatory to have them in a Java class. b. Setting and retrieving values of variables using getters and setters is faster than directly accessing the variables. c. They allow us to get and set the values for variables declared as private. d. None of the above a. An interface effectively has the exact same functionality as a java class b. An interface is like a blueprint - any class implementing an interface must implement all the functions defined in an interface c. It is possible to have concrete function definitions inside an interface d. A class can not implement more than one interface 19. Consider the following code snippet: List<String> list = new LinkedList<String>(); (CC) © ( D @ Ⓒ list.add("Ronald"); list.add("Mary"); list.add("Samuel"); list.add("Amélie"); Iterator<String> i = list. while (i. C C O 2 System.out.println(i. } What is the correct way of filling blanks 1, 2, and 3 so that the list of names is printed. a. 1 > elements() 2 -> empty() 3 -> next() b. 1 > iterator() 2 -> hasNext() 3 -> next() c. 1 > iterator() 2 -> next() 3-> nextElement() d. 1 -> iterator() 2 -> more() 3 ->get() (D C E E O D (D) D (E) E (E) (E) E 3 161 162 163 164 165 166 167 168 (B) (B (B) (B) B B (B) B Ⓒ C C (C (C) C C Ⓒ 9@ (D (D) (D) (D) (D D O D B Co E (E) (E) (E (E. (E) (E) AIIIIIII
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Introduction to Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning