Java is one of the most ubiquitous and versatile languages in the world. It runs behind the scenes for a large portion of the websites you use daily, as well as in many desktop and smartphone apps. It’s well-suited for large programs that need performance and scalability.
Prework and Introductions
This is content we need to cover before we can really get to work programming.
- Welcome To Java and Clojure!
- The Command Line
- Git
-
Assignment:Terminal Velocity - What is Java anyhow?
-
Assignment:Hello World - Integrated Development Environment
- IntelliJ IDEA
-
Assignment:Just Joking
In life, we need to walk before we can run. In Java, we need to write simple programs to learn the lay of the land.
- The Basics
- Variables
-
Assignment:What's Wrong With This Thing?! - Primitives
- Operators
- Order of operations
-
Assignment:Hello Operator - Conditionals
- Loops
-
Assignment:Kata: FizzBuzz
Classes and objects are the core of Java. You can't do anything without them.
- Modeling
- Classes
- Objects
-
Assignment:Lost Cards - Literals
- String literals
- New
- Methods and invocation
- Scanner
-
Assignment:Low End Calculator
Now that we know what classes are, how to instantiate them, and how to call methods on them, let's learn how to actually write our own classes.
- Class
- Properties
- State
-
Assignment:Objective Evidence - Classes are organized into packages
- Package
- Import
- Constructors
- Methods
- Accessors and Mutators
-
Assignment:Methodically Learning - Encapsulation
- Exceptions
- Responsibilities
- Static
- Static Properties
- Static Methods
-
Assignment:99 Bottles of Beer
Arrays are used to store lists of objects.
- Introduction
- Array
- Arrays of primitive values
- Arrays of objects
- Array Literals
- Length
- Iterating over arrays with for
- Iterating over arrays with foreach
- Multidimensional Arrays
- Arrays class
Arrays are awesome and all, but, quite honestly, they're a bit primitive. The static nature of arrays can make them hard to work with. To resize an array you have to create a whole new array. You can only index items in the array by a numeric value. You have to use the Arrays class for any fancy capabilities. They only solve one problem, working with lists of objects or primitives.
Happily, Java includes the Java Collections Framework (JCF). The JCF provides a bunch of classes whose purpose it is to work with collections of data. A collection is a group of objects. These objects are called elements. Different types of collections have different features. All collections in Java are iterable. This means you can loop over them using foreach syntax.
Debugging software is more of an art than a science. It's quite a bit like solving a puzzle. You will probably have pieces of the puzzle given to you. These might be error messages or unexpected behavior. With that knowledge you can usually narrow down where the problem is coming from. You can dig into that area, looking for more information. Once you have all enough of the pieces, you can put the picture together and fix the bug.
There are many ways to test software. New programmers will typically just run their code, over and over, trying to find and fix problems. This can be extremely time consuming. Sometimes businesses will hire a quality assurance person to manually test an application, looking for issues. These QA people may become rather sophisticated over time. But, eventually, almost any system will become too complex to reliably test manually.
- JUnit
- Directory structure
- The anatomy of a test
- Running the test
- Test results
- Classic Assertions
- Hamcrest Matchers
- Testing for expected exceptions
- Don't test for unlikely exceptions
- The JUnit lifecycle
- Run tests frequently
- Test behavior, not methods
Test Driven Development (TDD) is a widely used process for writing software. With TDD, the coding process is the reverse of what you might expect, you write your tests first and then write code that makes them pass.
.... insert more curriculum here ....