Lecture notes

contents


Intro to arrays

  • Java Arrays are initialized with all 0s at every index
  • ArrayOutOfBoundsException →
  • Buffer Overrun Attack →
  • Printing out an arrays of arrays prints out the references of the included arrays
  • Using an index + updating: numbers[i++], numbers[++i]
  • Array reference can be passed as parameters → passing an array as a parameter passes the reference and the initial array is modified!

Simple algorithms (possible exam questions)

  • Finding min/max
  • Find a value within an array
  • Sorting an array

Key takeaways

  • a

Lecture slides