Getting Started with Java

Think about a phone charger that works in any country with the right adapter. You make it once, and it works everywhere.

Java was built with the same idea. You write your program once. It can then run on Windows, Mac, Linux and many other devices.

What Is Java?

Java is a programming language. You use it to give a computer clear instructions.

In simple words: Java is a way to tell a computer what to do, step by step.

Where Is Java Used?

Java is one of the most used languages in the world. You will find it in:

  • Android apps
  • Large business systems, like banking software
  • Web servers
  • Tools that handle huge amounts of data

Because so many companies use Java, it is a useful skill for getting a job.

Do I Need Any Experience?

No. This section starts from the very beginning. You only need a computer and some patience.

Type every example yourself and run it. Small mistakes will happen. Fixing them is how you learn.

What You Will Learn

In this section, you will learn:

  1. What a Java program looks like and how it runs
  2. How to store information in variables
  3. How to do maths and comparisons with operators

Easy Way to Remember

Variables hold things. Operators do things with them. Almost every program you write mixes these two.

After This Section

Next comes Control Flow. That is where your program learns to make choices with if and repeat work with loops.

Lessons in this section

  1. Introduction to Java

    Learn what Java is, where it came from, the JVM, JRE and JDK, how to install Java, and how a Java program is written, compiled and run.

  2. Variables and Data Types

    Create variables and constants, choose between Java's primitive and non-primitive types, read input with Scanner, and convert between types with casting, parse methods and String.valueOf.

  3. Operators

    Use Java's arithmetic, increment, comparison, logical, assignment, ternary, bitwise and shift operators, and learn the order Java follows to evaluate an expression.