Unit 1: Introduction to Java

Lesson 1: What is Java?

It's a FREE programming language based on C and C++. It can run as an application on a computer or as an applet in a browser. You cannot make a java program into a .exe file.

Special features:

Why study Java?

1. Look at these three websites. What do you notice?
2. Android uses Java

How does Java work?

There are always two steps: COMPILE, then RUN:

  source code ——►
bytecode ——►
machine code
running on CPU
written using an IDE compiler
(in JDK)
  JVM (interpreter)
(in JRE)
Filenames: Program.java javac.exe Program.class java.exe

Your first program

Have a look at this set of templates and then write a program to print "Hello World".