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 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
JAVA Related Material ➡
https://drive.google.com/folderview?id=1Zr1BJvFX7P0WG0WEZfbB5SyVYSb_4knk
https://drive.google.com/folderview?id=1Zr1BJvFX7P0WG0WEZfbB5SyVYSb_4knk
Which Map is synchronized?
Anonymous Quiz
38%
Hashtable
22%
ConcurrentSkipListMap
17%
ConcurrentHashMap
22%
All
HashMap can be synchronised by........?
Anonymous Quiz
39%
Map m=Collections.synchronizedMap(hashMap);
27%
Map m=hashMap.synchronizedMap();
27%
Map m=Collection.synchronizedMap(hashMap);
7%
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();
}
}
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);
}
}
{
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);
}
}