please help with java question A 4-by-7 array like the following int arr[][] = n
ID: 3763138 • Letter: P
Question
please help with java question
A 4-by-7 array like the following
int arr[][] = new int[4][7];
contains:
4 rows and 7 columns
7 rows and 4 columns
3 rows and 6 columns
6 rows and 3 columns
· The following code declares and initializes an ArrayList collection variable that can only store Scanners (you may assume that ArrayList and Scanner have been properly imported)
ArrayList<Scanner> tsaInventory = new ArrayList<Scanner>();
True
False
The following code:
int fib[][] = {{0, 1, 1}, {2, 3, 5, 8}, {13, 21, 34, 55, 89}};
System.out.print(fib[2][6]);
displays 13
displays 8
displays an unknown value
does not compile
throws an Exception at runtime
4 rows and 7 columns
7 rows and 4 columns
3 rows and 6 columns
6 rows and 3 columns
· The following code declares and initializes an ArrayList collection variable that can only store Scanners (you may assume that ArrayList and Scanner have been properly imported)
ArrayList<Scanner> tsaInventory = new ArrayList<Scanner>();
True
False
The following code:
int fib[][] = {{0, 1, 1}, {2, 3, 5, 8}, {13, 21, 34, 55, 89}};
System.out.print(fib[2][6]);
displays 13
displays 8
displays an unknown value
does not compile
throws an Exception at runtime
Explanation / Answer
4 rows and 7 columns
True
throws an Exception at runtime
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.