JAVA
2.7K subscribers
73 photos
111 files
76 links
Download Telegram
Which of these class should be preferred to be used as a key in a HashMap?
Anonymous Quiz
21%
String
41%
Integer
8%
Double
29%
Any of these
What should we use when add and remove operations are more frequent than get operations?
Anonymous Quiz
37%
LinkedList
27%
ArrayList
10%
Vector
27%
All
Iterator returned by ArrayList is?
Anonymous Quiz
56%
Fail-fast
33%
Fail-safe
11%
none
Iterator returned by LinkedList is?
Anonymous Quiz
38%
Fail-fast
53%
Fail-safe
9%
none
Iterator returned by CopyOnWriteArrayList is ?
Anonymous Quiz
50%
Fail-fast
41%
Fail-safe
9%
none
Iterator returned by HashMap on key, value and entry is?
Anonymous Quiz
48%
Fail-fast
43%
Fail-safe
9%
none
Iterator returned by Hashtable on key, value and entry is?
Anonymous Quiz
63%
Fail-fast
29%
Fail-safe
8%
None
Iterator returned by ConcurrentHashMap on key, value and entry is?
Anonymous Quiz
39%
Fail-fast
57%
Fail-safe
4%
None
Iterator returned by LinkedHashMap on key, value and entry is?
Anonymous Quiz
46%
Fail-fast
40%
Fail-safe
14%
None
Iterator returned by TreeMap on key, value and entry is?
Anonymous Quiz
54%
Fail-fast
38%
Fail-safe
8%
None
Iterator returned by ConcurrentSkipListMap on key, value and entry is?
Anonymous Quiz
44%
Fail-fast
46%
Fail-safe
10%
None
Which Set implementation is sorted and synchronized?
Anonymous Quiz
36%
LinkedHashSet
27%
ConcurrentSkipListSet
27%
TreeSet
10%
CopyOnWriteArraySet
concurrentSkipListMap allows
Anonymous Quiz
26%
one null key
20%
many null values
43%
All
11%
None
Fill in the blank to compile the code successfully.
abstract class A{
int a=100;
public abstract void showA();
}
public class B extends A{
.............//Fill the blank
public static void main (String[] args){
A objA=new B();
objA.showA();
}
}
public class Program
{
int a;
boolean isTrue;
static int i;
public static void main(String[] args) {
Program p=new Program();
System.out.println(p.a);
System.out.println(p.isTrue);
System.out.println(p.i);
}
}