Arush22

Untitled

Apr 10th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. 1. int [][] a; int a [][];
  2. 2. true
  3. 3. false
  4. 4. false
  5. 5. a[2][4]
  6. 6. a.length
  7. 7. a[2].length
  8. 8. true
  9. 14. 4
  10. 15. Ajaccio
  11. 16. 3
  12. 17. row = 0, column = 3;
  13. 18. Vancouver
  14. 33. System.out.println(geo[1][2]);
  15. 34. System.out.println(geo[0][5]);
  16. 50. There should be arrays within the first array (Put parentheses).
  17. 51. The row at index 1 has a length of 2 and doesn't go to index 2.
  18. 52. The second dimension is not initialized.
  19. 53. The second row contains decimal numbers even though the two dimensional array is one of integers.
  20. 59. You should not initialize the number of elements in the array, if you are already going to enter the elements in the array. Get rid of the two in the first pair of brackets.
  21. 65. You put ArrayList after new but that is no the type of the array. Replace ArrayList with ArrayList<Integer>.
  22. 97. I see this as an advantage, because if you don't want the same number of values (columns) in the second row as the first one for example, you should not have to deal with null values in your two-dimensional array. This feature of two-dimensional arrays allows you to avoid that by having a different number of values per row.
Add Comment
Please, Sign In to add comment