¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

Java 2

Misael Pinedo 31 preguntas

Hacer el test

Preguntas del test (31)

  1. 1What is the difference between iterator access and index access?
    1. AIndex based access allow access of the element directly on the basis of index The cursor of the datastructure can directly go to the 'n' location and get the element.
    2. BIn Iterator based access, the cursor has to traverse through each element to get the desired element.
    3. CInsertion, updation or deletion will be faster for index based access if the operations are performed on elements present at at last of the datastructure.
    4. DInsertion, updation or deletion will be faster for iterator based access if the operations are performed on elements present in between the datastructure
    5. EInsertion, updation or deletion will be faster for iterator based access if the operations are performed on elements present at at last of the datastructure.
    6. FInsertion, updation or deletion will be faster for index based access if the operations are performed on elements present in between the datastructure
    7. GArrayList is index access and LinkedList is iterator access
    8. HArrayList is iterator access and LinkedList is index access
  2. 2How to sort a list in reverse order?
    1. AList list = new ArrayList();
      Comparator comp = Collections.reverseOrder();
      Collections.sort(list, comp)
    2. BList list = new ArrayList();
      Collections.sort(list, comp)
    3. CList list = new ArrayList();
      Comparator comp = Collections.reverseOrder();
      Collections.sortReverse(list, comp)
  3. 3Can a null element be added to a TreeSet or HashSet?
    1. AVerdadero
    2. BFalso
  4. 4How to sort list of strings - case sensitive?
    1. ACollections.sort(list,String.CASE_INSENSITIVE_ORDER);
    2. BCollections.sort(list,String.CASE_SENSITIVE_ORDER);
    3. CCollections.sort(list,String.SENSITIVE_ORDER);
  5. 5How to make a list unmodifiable (ArrayList, Vector, LinkedList)
    1. ACollections.unmodifiableList(list)
    2. BCollections.readOnly(list)
    3. CCollections.nonmodifiable(list)
  6. 6Is a thread-safe implementation of Map Interface. In this class put and remove method are synchronized but not the get method. Better than HashTable in terms of performance
    1. AConcurrentHashMap
    2. BLinkedHashSet
  7. 7Which is faster to iterate LinkedHashSet or LinkedList?
    1. ALinkedHashSet
    2. BLinkedList
  8. 8Which data structure HashSet Implements?
    1. AImplements hashmap internally to store the data
    2. BImplements linkedlist internally to store the data
  9. 9What is identityHashMap?
    1. AUses == for equality checking instead of equals()
    2. BUses equals() for equality checking instead of ==
  10. 10What is an exception?
    1. AIs said to be thrown whenever an exceptional event occurs in java which signals that something is not correct with the code written an may give unexpected results.
    2. BIs said to be thrown whenever an exceptional event occurs in java which signals that something is not correct with the code written an may expected results.

Información

Descripción
|
Idioma
Español
Visitas
19
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?