AP CSP Practice Test On Arrays (ArrayList And 2D Arrays)

Access More Questions
Consider this class: public class BingoCard { private int[] card; /** Default constructor: Creates BingoCard with * 20 random digits in the range 1 - 90. */ public BingoCard() { /* implementation not shown */ } /* Display BingoCard. */ public void display() { /* implementation not shown */ } ... } Assuming that players has been declared as an array of BingoCard , which of the following is a correct replacement for /* construct each BingoCard */ ? I for (BingoCard card : players) card = new BingoCard(); II for (BingoCard card : players) players[card] = new BingoCard(); III for (int i = 0; i < players.length; i++) players[i] = new BingoCard();
Correct Answer:
III only
Explanation:
Correct answer: III only

Access more questions from this quiz

Continue to AP CSP Practice Test on Arrays (ArrayList and 2D arrays) for more practice questions and the full quiz experience.

Access More Questions