Programming foundations

Stage 1 of 6 · 9 lessons · ~4 months

Your first language

Learn Java properly: types, control flow, methods, classes, the core collections and exceptions. Java makes you be explicit, which slows the first weeks and pays off in every language after it.

Start: The JDK, compiling and running

Lessons· one lesson for each topic, in this order

  1. 1The JDK, compiling and running
  2. 2Types, variables and input
  3. 3Strings and equals()
  4. 4Conditionals and loops
  5. 5Methods, parameters and scope
  6. 6Classes and objects
  7. 7Arrays, ArrayList and HashMap
  8. 8Exceptions and stack traces
  9. 9Packages and reading files

Start with· follow one of these

  • CourseFree
    Java Programming MOOC

    University of Helsinki · Beginner

    Free Helsinki course with hundreds of auto-tested exercises; parts 1 to 8 cover this stage

  • GuideFree
    Dev.java: Learn Java

    Oracle · Beginner

    Official tutorials from the Java team: read the language basics path next to the MOOC

Practise

  • Small exercises in your language track, with free feedback from a human mentor

Keep handy

  • Quick syntax lookups and an online compiler for testing a snippet on a shared computer

Before moving on: Write a 200-line command-line Java program, such as a quiz or a budget tracker, with a few classes, an ArrayList, a HashMap, file reading and exception handling, compiled and run from the terminal.

Tauseef's advice
Install a JDK and run javac and java from the terminal at least once before you let an IDE hide the build from you. Do the MOOC exercises rather than just reading: the automated tests on each one are what make it work.

Mark this stage as not done?