Assume class Book has been declared. Which set of statements creates an array of Books?
a.
Book[] books;
books = new Book[numberElements];
b.
Book[] books];
books = new Book()[numberElements];
c.
new Book() books[];
books = new Book[numberElements];
d. All of the above.
Ans: a.
Book[] books;
books = new Book[numberElements];
7.6 Q3: How many Book objects are created by the following statement?
Book[] books = new Book[10];
a. 10
b. 0
c. 5
d. None of the above.
b. 0. The statement creates an array of element that can refer to Book objects. Each element is initially null.
You might also like to view...
Match the following ways to manage large amounts of e-mail with their function:
I. filter junk e-mail II. presort e-mail III. categorize messages IV. sort messages V. use columns A. define rules to help with organization B. assign names to different colors and then assign e-mails to colors C. display appropriate details to help view useful information D. block unsolicited and unwanted e-mail E. achieve by clicking the heading
The ____________________ system has only two digits.
Fill in the blank(s) with the appropriate word(s).
Which of the following terms does NOT refer to a service that backs up computer files over the Internet on a scheduled basis and stores the files on its computers?
A) Remote backup B) Auto backup C) Managed backup D) Online backup
Describe the three levels of cache used by a processor.
What will be an ideal response?