Which of these allows the storage of many null values?
Anonymous Quiz
5%
Set
55%
List
21%
None of these
18%
All of these
nextIndex() and previousIndex() are methods of which interface?
Anonymous Quiz
13%
IndexIterator
23%
Iterator
48%
ListIterator
16%
NextPreviousIterator
Vector extends which of these?
Anonymous Quiz
19%
ArrayList
25%
LinkedList
42%
AbstractList
14%
None
In Iterator, nextElement() method of Enumeration has been changed to:
Anonymous Quiz
42%
next()
35%
getNext()
19%
returnNext()
3%
name remains same
From Java 5 onwards, which one of these is recommended to replace Hashtable?
Anonymous Quiz
28%
ConcurrentHashMap
38%
HashMap
34%
ConcurrentHashtable
0%
None
Which does not allow to store a null value?
Anonymous Quiz
44%
TreeSet
15%
LinkedHashSet
32%
HashSet
9%
None
What describes how well an algorithm performs in best, average or worse case scenarios?
Anonymous Quiz
8%
Big-B
62%
Big-O
31%
Big-Data
0%
Big-N
An ordered array has a search time complexity of?
Anonymous Quiz
26%
O(n)
32%
O(1)
39%
O(log n)
3%
O(n-1)
Which Map class must be preferred in multi-threading environment to maintain natural order of keys?
Anonymous Quiz
22%
ConcurrentHashMap
19%
ConcurrentSkipListMap
22%
ConcurrentMap
37%
All
Which list class must be preferred in multi-threading environment, considering performance constraint
Anonymous Quiz
23%
Vector
17%
CopyOnWriteArrayList
33%
ArrayList
27%
ConcurrentArrayList
Which Set class must be preferred in multi-threading environment, considering performance constraint
Anonymous Quiz
12%
HashSet
35%
ConcurrentSkipListSet
35%
LinkedHashSet
19%
CopyOnWriteArraySet
Which Map class must be preferred in multi-threading environment, considering performance constraint
Anonymous Quiz
33%
Hashtable
19%
CopyOnWriteMap
48%
ConcurrentHashMap
0%
ConcurrentMap
import java.util.HashSet;
import java.util.Set;
public class Program
{
public static void main(String[] args) {
Set hashSet=new HashSet();
hashSet.add("1");
hashSet.add(1);
hashSet.add(null);
hashSet.add("null");
System.out.println(hashSet);
}
}
import java.util.Set;
public class Program
{
public static void main(String[] args) {
Set hashSet=new HashSet();
hashSet.add("1");
hashSet.add(1);
hashSet.add(null);
hashSet.add("null");
System.out.println(hashSet);
}
}
import java.util.HashMap;
import java.util.Map;
public class Program
{
public static void main(String[] args) {
Map<String,String> hashMap=new HashMap<String,String>();
hashMap.put(new String("a"),"audi");
hashMap.put(new String("a"),"ferari");
System.out.println(hashMap);
}
}
import java.util.Map;
public class Program
{
public static void main(String[] args) {
Map<String,String> hashMap=new HashMap<String,String>();
hashMap.put(new String("a"),"audi");
hashMap.put(new String("a"),"ferari");
System.out.println(hashMap);
}
}