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

Test

Practice Quiz Lesson 9

Athena Kozak 10 preguntas

Hacer el test

Preguntas del test (10)

  1. 1This code will run:

    int [][] numbers = new int numbers[3][];
    1. ATrue
    2. BFalse
  2. 2What is the 2D array location for the following?

    int [][] numbers = {{1,2,3,4},{8,7,6}};

    What is the 'array address' of 7?
    1. A[0][1]
    2. B[1][1]
    3. C[1][2]
    4. D[0][2]
  3. 3Can 2D Arrays vary in length?
    1. AVerdadero
    2. BFalso
  4. 4What is the correct formula for a for loop?
    1. Afor( <statement>; <initialization>; <condition>;)
      <update>;
    2. Bfor( <condition>; <initialization>; <update>;)
      <statement>;
    3. Cfor( <initialization>; <condition>; <statement>;)
      <update>;
    4. Dfor( <initialization>; <condition>; <update>;)
      <statement>;
  5. 5What would print out?

    String [][] names = new String {{"Gary", "Albert", "Athena"}, {"Ashley", "Po Ming", "Kate", "Pedram"}};

    System.out.println(names[1][2]);
    1. AAlbert
    2. BAthena
    3. CPo Ming
    4. DKate
  6. 6In Java, collections...
    1. Acannot vary in size
    2. Bcan only contain any reference types
    3. Care sets, lists and maps
    4. Dall of the above
  7. 7ArrayLists are Arrays
    1. ATrue
    2. BFalse
  8. 8what is the correct for-each loop?
    1. Afor(int i = 0 ; i < numbers.length ; i++)
      {
      System.out.println(i)
      }
    2. Bfor( n Numbers : numbers)
      {
      System.out.rpintln(n)
      }
    3. Cfor(int i = 5 ; 5 == 5 ; i++)
      {
      System.out.println(i)
      }
    4. Dfor(Numbers n : numbers)
      {
      System.out.println(n)
      }
  9. 9This creates an anonymous object in memory:
    Book book1 = new Book();
    library.add(book1);
    1. AVerdadero
    2. BFalso
  10. 10Arrays are measured with what operator?
    1. A.length()
    2. B.length
    3. C.size()
    4. D.size

Información

Descripción
Test sobre Practice Quiz Lesson 9, creado por Athena Kozak el 22/03/2019.
Idioma
English
Visitas
2
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Más sobre Java Arrays and Collections

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?