Question
Answer the Questions(Multiple Choice ): Question 21 Which statement will return the number of rows in a two dimensional array a? a. int a =
Answer the Questions(Multiple Choice):
Question 21
Which statement will return the number of rows in a two dimensional array a?
a. | int a = a.rows | |
b. | int a = a.length | |
c. | int a = a[i].length | |
d. | int a = a.size |
2.5 points
Question 22
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?
a. | ArrayList | |
b. | ArrayList library = new ArrayList | |
c. | both a and b | |
d. | neither a or b |
2.5 points
Question 23
What method of an arraylist class object returns the number of elements in an ArrayList object?
a. | size() | |
b. | capacity | |
c. | length | |
d. | length( ) |
2.5 points
Question 24
After the following code sequence is executed, what are the contents at ArrayList index 1 in a?
ArrayList
a. | 10 | |
b. | 7 | |
c. | 4 | |
d. | 21 |
2.5 points
Question 25
Which of the following is inherited by a subclass
a. | all instance variables and methods | |
b. | public instance variables and methods only | |
c. | protected instance variables and methods only | |
d. | protected and public instance variables and methods
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started