More on Interfaces
This lesson continues discussion of interfaces in Java.
We'll cover the following...
We'll cover the following...
1.
Is the complexity of the following code snippet O(n) always?
void printName(List<String> names) {
for(int i=0; i<names.size(); i++) {
System.out.println(names.get(i));
}
}
0/500
Show Answer
1 / 2
Technical Quiz
1.
Can the methods of an interface be made private?
A.
Yes
B.
No
1 / 2
1.
What is the difference between Comparable and Comparator interfaces?
0/500
Show Answer
Did you find this helpful?
The Comparator is a functional interface that can be used to specify an ordering relation between the elements of a type other than their ...