COMP 202 Lecture Notes - Lecture 17: Gibberish, Jagged Array, Pariah Dog
![COMP 202 Full Course Notes](https://new-docs-thumbs.oneclass.com/doc_thumbnails/list_view/2177048-class-notes-ca-mcgill-comp-202-lecture10.jpg)
100
COMP 202 Full Course Notes
Verified Note
100 documents
Document Summary
Compiler doesn"t care because you"re going from int to double (smaller to bigger), but your numbers will be truncated, so your value will be incorrect. Create an array of arrays! in our example: create a multidimensional array int[][] grades grades[][] contains a bunch of arrays, which contain a bunch of ints. If grades is an array of arrays, then the first index represents which array within grades to use. grades[0] the first array (e. g. assignment 1) grades[1] the second array (e. g. assignment 2) The second index represents a specific number within a specific array. grades[0][10] the 11th grade on assignment 1 grades[3][5] the 6th grade on assignment 4 array. length for multidimensional arrays. Grades. length means "how many elements are in the array grades" Grades is an array, where it just so happens every element is an array. This means it is asking "how many arrays are there inside of grades" (e. g. the number of assignments.