Interpreting Java syntax

Introduction to Java

Jim White

Java Developer

Class

Class with code inside

Introduction to Java

Classes organize related code

Multiple classes, each with different code inside

Introduction to Java

Classes keep things organized

Even more classes

Introduction to Java

Defining class

Java code with curly brackets highlighted after the Greeting class

Introduction to Java

Class and the main method

public static void main inside the class, containing code to be run

Introduction to Java

Case

Main does not equal main

Introduction to Java

Case, semicolons

Every line inside the method ends with a semi-colon

Introduction to Java

Case, semicolons, and white space

Whitespace doesn't affect code, only readability

Introduction to Java

Println as a calculator

class PrintlnAsCalculator {
  public static void main(String[] args) {
    System.out.println(1+2);
  }
}
3
Introduction to Java

Adding comments

Java code with code comments starting with //

Introduction to Java

Let's practice!

Introduction to Java

Preparing Video For Download...