O GoConqr está de visual novo! Conte para nós o que você achou.

Quiz

Practice Quiz Lesson 9

Athena Kozak 10 perguntas

Fazer o quiz

Perguntas do quiz (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. AVerdadeiro
    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. AVerdadeiro
    2. BFalso
  10. 10Arrays are measured with what operator?
    1. A.length()
    2. B.length
    3. C.size()
    4. D.size

Informações

Descrição
Quiz sobre Practice Quiz Lesson 9, criado por Athena Kozak em 22-03-2019.
Idioma
English
Visualizações
2
Avaliação
Ainda sem avaliações
Avalie este quiz
Avalie este quiz

Mais sobre Java Arrays and Collections

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?