QUESTION 21 2.5 points Save Answer Which statement will return the number of rows in a two dimensional array a int a = a.rows int a a.length O c int a = a[i] length d. int a a. size QUESTION 22 2.5 points Save Answer What statement(s) could you use to declare and instantiate an ArrayList object reference of Book objects named library with a default capacity of 10 elements? ArrayList«Book > library = new ArrayList«Book>0; ArrayList Book> library library = new ArrayList0; C. both a and b d. neither a or b
Expert Answer
21- int a=a.length;
22-Both a and b (as both the statements are same)
23-size()
24- 21 because first at index 0 7 is added at 1 10 is added at 2 21 is added then at 1 4 is added then element at 0 is removed so the elements that remain in array list are 4,21 so at index 1 is 21.
25-public and protected instance variables and methods.
26-Are not inherited by and cannot be accessed by a sub class (because constructors are never inherited.)
27-an object of class A is an object of class B
28-AA%
BB
CC
29-False as (it is legal to have multiple catch blockes for one try block but it is not compulsary to have a finally block it is optional)
30-java Illuminated.
32-Interface as in java one class cannot extend two classes byt can implement more than one interface.
33-True