CIS 35A: Introduction to Java Programming

Home | Green Sheet | Lectures | Assignments | FAQ

Introduction

Introduction
How does Java work?

The goal is to write one application and have it work on whatever device your friends have.

  1. Source: Create a source document.
  2. Compiler: Run your document through a source code compiler. The compiler checks for errors and won't let you compile until it's satisfied that everything will run correctly.
  3. Ouput: The compiler creates a new document, coded into Java bytecode. Any device capable of running Java will be able to interpret/translate this file into something it can run. The compiled bytecode is platform-independent.
  4. Vitual Machines: Your friends don't have a physical Java Machine, but they all have a virtual Java machine running inside their electronic gadgets. The virtual machine reads and runs the bytecode.

Introduction | History | How does Java work? | What you'll do in Java? | Code structure in Java | Anatomy of a class | The main() method