Categories
Foundations of Programming

FIT9017: Week 6

A bit of a late entry for last weeks classes. The lecture was once again presented by Michael Smith and this week we ran through a number of Java (and programming) basics.

  • Library Classes – Java API, API documentation is generally the first google results when you search a method/data type + ‘JAVA’
  • Collections – Arrays and ArrayLists is a types of collection
  • Dynamic Arrays – called ‘ArrayList ‘ in Java (there may be other collections in Java? but ArrayList the only one I know of). Much better than arrays in that the size is dynamic and objects can be stored and all iteration and sorting is pretty much already optimized. Java’s for-each loop – for(Elementtype element : collection) – for (String note : noteBook)
  • Loops – Some types of loops in Java
    • for(i = 0; i < isbn.Length(); i++) {}
    • while (scanner.hasNext()) {}
    • do {} while (inChar != ‘X’);
    • for (String note : noteBook) {}