Java Lessons

Getting Started with Java

Getting Started with Java

Set up your system to start coding in Java ...

Java Basics

Java Basics

Wondering what all the fuss about Java is? Here is everything you need to get started.

Variables

Variables

Every variable has to be declared before we can use it.

Booleans

Booleans

There is a primitive type in Java that tells the truth and nothing but the truth. It's called boolean.

If and else

If and else

What if we want to execute a code snippet only if a specific condition is met?

Arrays

Arrays

An array is a container for a fixed number of values of a single type.

HashMaps

HashMaps

HashMaps are collections of key-value pairs. In a way, they're like dictionaries: every key points to a value.

Strings

Strings

We've already combined a couple of strings in the earlier chapters. Do you remember?

ArrayLists

ArrayLists

Often times we don't really know how many items an array will have down the line. If that's the case, it might be a good idea to use an object called ArrayList.

Loops

Loops

Loops are magical things: they allow us to execute blocks of code for as often as we want.

Methods

Methods

A method is a named block of code that serves a specific purpose. In order to call a method, we use its name followed by parentheses.

Classes

Classes

So-called classes are kind of blueprints

Main and modifiers

Main and modifiers

Every Java program needs an entry point, which is what the main() method provides

Rate This Course