01:198:111 Lecture Notes - Lecture 18: The Sydney Morning Herald, Multiplication Table
01:198:111 verified notes
18/28View all
Document Summary
Arrays are not objects, they are primitive data types. Meaning they hold a collection of the same primitive data types. What is an object, class, constructor, etc. What is a default constructor and specific constructor. The bug is that int i=n, should be int i=n-1 because if a[n] does not exist, it is out of bounds due to how index numbering works. An array of size n is expected to contain distinct numbers from 1 ton(in any. Hint: if you take the all the numbers from 1 to n and add them up, they should all order). How do we find out if each number appears exactly once? equal to a certain sum, n(n+1)/2. 2d arrays are really just tables like the multiplication table es en example. Rows start from 0 from top to bottom. Columns start from 0 from left to right.