Introduction

Updated onbyAlan Morel
Introduction

Java is a high-level, cross-platform, mature, object-oriented programming language. Java is extremely popular due to its flexibility and ability to run anywhere. It abstracts away a lot of details that we don't need to worry about which allows us to focus on the logic in our code.

Prerequisites

  • A computer that can install and run Java.
  • A desire to learn how to code!

If you've got these two things, you're ready to start this class!

Installing Java

To install Java if you don't already have it installed, head on over to the Java homepage to get your copy.

The very modern looking Java homepage.

To test that you installed Java correctly, run this command:

BASH
java -version

You should get an output similar to this:

BASH
C:\Users\Sabe>java -version java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

If you have Java installed, you're good to go.

Installing a Java IDE

You will most likely need a Java IDE to write, compile and run your Java code, at least if you don't want to do all of this in the command line. There are many Java IDEs to choose from, including IntelliJ IDEA, Eclipse, and NetBeans. We recommend IntelliJ IDEA but the choice is entirely yours. At this point, we will assume you either have an IDE or are capable of doing it all in your command line. Either way, let's move on to writing Java code!

Hello World

The classic example to starting any programming language has got to be printing out Hello World!, so let's do just that in Java:

JAVA
public class Main { public static void main(String[] args) { System.out.println("Hello World!"); } }
BASH
Hello World!

If you see the words printed, you have everything you need to continue on with this class on Java!

You, excited to start coding Java!

Resources

Next Lesson »
Copyright © 2017 - 2024 Sabe.io. All rights reserved. Made with ❤ in NY.