GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

Practice Quiz Lesson 9

Athena Kozak 10 Fragen

Quiz starten

Fragen in diesem 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. ARichtig
    2. BFalsch
  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. ARichtig
    2. BFalsch
  10. 10Arrays are measured with what operator?
    1. A.length()
    2. B.length
    3. C.size()
    4. D.size

Informationen

Beschreibung
Quiz am Practice Quiz Lesson 9, erstellt von Athena Kozak am 22/03/2019.
Sprache
English
Aufrufe
2
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Mehr zu Java Arrays and Collections

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck